On Tue, Jun 7, 2011 at 2:52 AM, Matt <mjwat...@gmail.com> wrote:

> Hi there,
>
> Can anyone provide me with some suggestions on how to optimise web2py
> for GAE?
>
> At present the code I've got deployed (based on Version 1.96.3
> (2011-06-06 16:16:02) seems incredibly slow.
>
> I keep getting DeadlineExceededExceptions and timeouts for simple
> request / responses like this:
>
> 121.73.240.51 - - [03/Jun/2011:14:23:16 -0700] "PUT /test.json HTTP/
> 1.1" 500 0 - "App/1.0 CFNetwork/485.13.9 Darwin/11.0.0,gzip(gfe)"
> "app.appspot.com" ms=155137 cpu_ms=607 api_cpu_ms=0 cpm_usd=0.016884
> loading_request=1 exit_code=104
>
> 2011-06-03 14:20:48.794
> no file locking, this will cause problems
> D 2011-06-03 14:20:55.690
> no sqlite3 or pysqlite2.dbapi2 driver
> D 2011-06-03 14:20:55.690
> no pymysql driver
> D 2011-06-03 14:20:55.694
> no psycopg2 driver
> D 2011-06-03 14:20:55.697
> no cx_Oracle driver
> D 2011-06-03 14:20:55.700
> no MSSQL/DB2 driver
> D 2011-06-03 14:20:55.703
> no kinterbasdb driver
> D 2011-06-03 14:20:55.707
> no Firebird driver
> D 2011-06-03 14:20:55.711
> no informixdb driver
> D 2011-06-03 14:20:55.715
> no sapdb driver
> D 2011-06-03 14:20:55.718
> no cubriddb driver
> D 2011-06-03 14:20:55.721
> no zxJDBC driver
> D 2011-06-03 14:20:55.724
> no Ingres driver
> D 2011-06-03 14:20:59.833
> no couchdb driver
> D 2011-06-03 14:20:59.837
> no mongoDB driver
> E 2011-06-03 14:23:16.094
> <class 'google.appengine.runtime.DeadlineExceededError'>:
> Traceback (most recent call last):
>  File "/base/data/home/apps/app/1.350865972846579479/gaehandler.py",
> line 59, in <module>
>    import gluon.main
>  File "/base/data/home/apps/app/1.350865972846579479/gluon/main.py",
> line 114, in <module>
>    rewrite.load()
>  File "/base/data/home/apps/app/1.350865972846579479/gluon/
> rewrite.py", line 261, in load
>    load_routers(all_apps)
>  File "/base/data/home/apps/app/1.350865972846579479/gluon/
> rewrite.py", line 352, in load_routers
>    if os.path.isfile(abspath(cpath, cname)) and
> cname.endswith('.py'):
>  File "/base/python_runtime/python_dist/lib/python2.5/posixpath.py",
> line 208, in isfile
>    st = os.stat(path)
> I 2011-06-03 14:23:16.097
> This request caused a new process to be started for your application,
> and thus caused your application code to be loaded for the first time.
> This request may thus take longer and use more CPU than a typical
> request for your application.
>
> The code I've deployed for the most part is extremely simple.
>
> The example /test.json above reads in a email address (provided via
> JSON) and responds with the persons username via JSON.
>
> I would have expected this type of operation to take only milliseconds
> but it's currently taking 155137!!!!
>
> Any ideas or help on this would be totally appreciated,
>
> Thanks in advance,
> Matt
>
> Also: Is there anyway to stop it from automatically attempting to find
> all of the other drivers each time? (Aside from hacking the code
> base.)
>
>
>
can you post your models ?

-- 
Sebastian E. Ovide

Reply via email to