Hi all,
We're facing a vexing issue with uwsgi where workers continue to handle
requests, even if the app initialization fails. The bad worker doesn't
exit, and will continue to process requests and return 500s to clients
("Python application not found"), even if the app's failure to initialize
was due to a transient problem.
We're using uwsgi 1.0.4 in emperor mode, with lazy worker loading.
While researching, I came across bug 77 and this post which seems to be
related:
http://www.mail-archive.com/[email protected]/msg02767.html
If this is the intended behavior of uwsgi, it seems to be highly
problematic, and is unexpected. I would expect that an app that doesn't
initialize properly would exit, or at least not continue to serve requests.
A quick review of the WSGI spec hasn't turned up anything that the app is
doing obviously wrong when exiting, but pointers would be appreciated.
(FWIW: the app is using Flask).
Any help with a fix or workaround would be highly appreciated, find our
full configuration below.
-Seamus
# uwsgi starter:
exec /usr/local/bin/uwsgi \
--uid www-data \
--emperor /etc/uwsgi/emperor \
--post-buffering 8192 \
--log-syslog uwsgi \
--no-site \
--log-4xx \
--log-5xx \
# example vassal config file
[uwsgi]
socket = 127.0.0.1:3033
lazy = true
workers = 12
master = true
no-orphans = true
harakiri = 70
reload-on-rss = 128
memory-report = true
max-requests = 12000
module = my_app.uwsgi
callable = app
chdir = /var/www/my_app
pyhome = /var/www/my_app
post-buffering = 8192
buffer-size = 8192
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi