On Mon, Oct 09, 2017 at 06:58:51AM +0200, Roberto De Ioris wrote: > > > Hello, > > > > The following question is a continuation of the one I asked in the > > SQLAlchemy Google group: > > https://groups.google.com/forum/#!topic/sqlalchemy/QT_jIVPzsDA > > > > What I see in the server logs are repeated but seemingly random “Packet > > sequence number wrong - got 102 expected 8” DB exceptions. The Google > > groups discussion suggested a threading issue which I am now trying to > > understand. > > > > I’m running uwsgi with nginx, with this configuration: > > > > <uwsgi> > > <master>true</master> > > <wsgi-file>/var/www/…/venv/myapp-uwsgi.py</wsgi-file> > > <socket>/var/run/…/myapp.sock</socket> > > <show-config>true</show-config> > > <processes>2</processes> > > <threads>2</threads> > > <uid>nginx</uid> > > <gid>nginx</gid> > > <chmod-socket>700</chmod-socket> > > <chown-socket>nginx</chown-socket> > > <plugins>python35</plugins> > > <virtualenv>/var/www/…/venv</virtualenv> > > </uwsgi> > > > > To disable multithreading, I changed <threads> to 1, but that seemed to > > have locked up the app server and no requests arrived. > > > > Any hints or suggestions or experiences of what could be going on here > > would be great! > > > > Thanks! > > Jens > > > > -- > > Jens Tröger > > http://savage.light-speed.de/ > > > > > > It looks like you are having a prefork issue. Just add lazy-apps to the > options to have a more 'friendly' setup for sqlalchemy pool
Thanks, I'll try that. Using the above XML configuration file, that would be <lazy-apps>yes</lazy-apps> or how would I configure this? Also, do you have suggestions for further reading? This blog seems like a good start: http://zarnovican.github.io/2016/02/15/uwsgi-graceful-reload/ Thanks! Jens -- Jens Tröger http://savage.light-speed.de/ _______________________________________________ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi