On 5/21/12 1:10 PM, Jason Grout wrote:
On 5/18/12 5:46 PM, Jason Grout wrote:
It does seem to me like the problems are in threads acquiring locks and
possibly sending/receiving data. Maybe switching to the multithreaded
flask server might help. For the record, all the other *.sagenb.org
servers are switched over to 5.0 and seem like they are working fine.

Just heads-up---as you may have seen, there was a problem with the other
*.sagenb.org servers on upgrade, but it was totally unrelated to the
thread locking problems we're seeing on sagenb.org, and has been resolved.

I'm going to be profiling things a bit more today to try to get to the
bottom of the sagenb.org thread contention problems. This might cause
sagenb.org to be slow or down periodically.

Another heads-up, and call for testing...

William: I tried switching over to a multi-threaded flask (werkzeug) server. The load absolutely crushed that server, so that's a no-go for a heavy site like sagenb.org (which is exactly what they said in the documentation).

Then I tried using uwsgi [1]. And *wow*. It's amazing how much faster things feel. All of this testing led to a big refactoring of the code to start up the notebook. The end result is that you can do:

sage -sh -c 'easy_install uwsgi'

and then in sage, do

sage: notebook(server="uwsgi")

and the notebook will launch with the uwsgi server.

(you can also do server="twistd" for the twisted server, and server="flask" for the flask server)

I've upgraded all *.sagenb.org servers *except* the main sagenb.org server to use uwsgi. Please let me know if you see any problems on any of the *.sagenb.org servers. If I don't hear of any problems by tomorrow or so, then I'll switch the main sagenb.org server over to uwsgi. My guess is that this won't completely solve our problems (there still are some pretty dumb and wasteful things the server is doing), but it should alleviate them quite a bit, hopefully.

Thanks,

Jason

[1] http://projects.unbit.it/uwsgi/ -- this is one of the leading WSGI production servers.

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to