And note that this is only an issue with file based sessions (the default), as the session file is locked for each request (unless explicitly unlocked). Database and cookie based sessions don't involve any locking. Note, in some cases, the locking is desirable, as it prevents race conditions if the requests are writing to the session.
Anthony On Monday, March 31, 2014 9:37:09 AM UTC-4, Massimo Di Pierro wrote: > It is a feature to ensure consistency of the data. You can serialize them > by doing this at the top of your models: > > if request.ajax: session._unlock(response) > > On Monday, 31 March 2014 02:52:28 UTC-5, Sandeep Gupta wrote: >> >> Hi All >> >> I've a setup on Amazon AWS, nginx -> uwsgi -> web2py. The db backend is >> mysql on Amazon RDB (earlier it was sqlite with same problem). On opening >> dashboard of the web2py application, it fires around 20 AJAX POST requests. >> However, the response is received serially in the browser. Also, if I try >> to open the same site in another tab of the browser, it does not open till >> all the AJAX requests are processed. >> >> I understand that each request is handled by a new uwsgi worker (which >> actually would be a new web2py process). Following is the snapshot from >> uwsgi config: >> processes = 8 >> master = true >> harakiri = 60 >> reload-mercy = 8 >> cpu-affinity = 1 >> stats = /tmp/%n.stats.socket >> max-requests = 2000 >> >> Each request is sent to 3rd party webserver by web2py application to >> check some status before a response is being returned. Python module >> 'requests' is being used for this purpose but without creating a separate >> thread/async task. >> >> Could somebody guide me as to what could be the bottleneck >> (nginx/uwsgi/web2py app?) and how should I debug this further? >> >> Br >> Sandeep >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

