Are there rules that have to be followed to allow Django to be grafefully
reloaded with a uWSGI server?

We're currently trying to migrate to uWSGI 1.3, using Django 1.4, but as
the project is originally started with Django pre 1.0, we're using this as
the conf file

[uwsgi]
socket = 0.0.0.0:7654
protocol = uwsgi

env = DJANGO_SETTINGS_MODULE=proj.settings

chdir = /var/python/project/src/proj
pythonpath = /var/python/project/src
module = django.core.handlers.wsgi:WSGIHandler()
touch-reload = /var/python/project/django.wsgi

processes = 20
buffer-size = 65536
enable-threads = true

max-requests = 5000

uid = 33
gid = 33



Everything works fine, except that HUP, touch-reload (yep, that's the old,
now unused .wsgi handler) or touching the uwsgi conf file (and causing a
reload via emperor) causes the workers to be killed without finishing the
response. Nginx says:

2012/10/15 11:29:55 [error] 24053#0: *187838 recv() failed (104: Connection
reset by peer) while reading response header from upstream


I've tried both the http and the uwsgi protocol, they have the same issue.
Is there a setting I've missed that must be set to enable graceful
reloading on the Django side?


Kind regards,

Chi Ho Kwok
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to