Hello,
We are trying to migrate our Pylons app from Paster to uWSGI. But we are
running into some issues when trying to use our app with uWSGI while running
more than one worker.
Our current set up is to have 22 separate instances of "paster serve"
running on each app server, each on its own port. There are a variable
number of app servers, and HAProxy balances among all of the "paster
serve" instances. The app works perfectly when keeping this architecture,
but substituting uWSGI (with 1 worker per instance) for Paster.
The current plan is to try and move to a setup where a single uWSGI
master process manages 20-odd workers on each app server and HAProxy
only sees each app server as a whole. Unfortunately, when running our
app in uWSGI with more than one worker, we get sporadic, but frequent,
sqlalchemy-related exceptions when testing under load. Following is an
example of one of the more common errors we get.
Error - <class 'sqlalchemy.exc.OperationalError'>:
(OperationalError) server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
It would seem that our app, or sqlalchemy, is making an assumption that
is no longer true when running as multiple workers in uWSGI. What are the
usual culprits in this kind of situation? Does anyone have any thoughts
on what to investigate?
We are on Pylons 0.9.6.2 and SQLAlchemy 0.5.3.
Regards,
Neil
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi