2014-02-06 17:50 GMT+00:00 Jeff Dairiki <[email protected]>: > I don't know enough about flask to say how you might go about doing this. > In pyramid, for example, you would most likely use a "tween" to commit or > rollback the session, then close it at the end of each request. (Or > use the transaction, zope.sqlalchemy, and pyramid_tm packages which > together > would do this for you.) >
Actually flask + sqlalchemy integration clearly says, that the session is managed in the background. BUT the link you provided provided me with another thing. It says: > Is the session thread-safe? > The Session is very much intended to be used in a non-concurrent fashion, which usually means in only one thread at a time. So I set uwsgi options to + processes = 4 + threads = 1 and that worked. So actually it wasn't the processes, it was the number of threads. Best practice obviously is to work with max. 1 thread under uwsgi + flask + sqlalchemy. Thank you very much for your support! Michael.
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
