Re: Django gracefully shutdown
On Fri, Dec 7, 2012 at 3:25 PM, Odagi <fcmiranda@gmail.com> wrote:
> I'll use Nginx with uWSGI or fastCGI (not sure yet), and my doubt is
> how can I shutdown my production Django app gracefully (for make
> changes for example).
on the first paragraph of the new uWSGI docs page about reloads:
"When running with the master process mode, the uWSGI server can be
gracefully restarted without closing the main sockets"
then it goes to explain how to reload code. without breaking any
request in the process.
in short, since Django loads all python code at startup, you can
replace the code (ideally using a VCS) while it keeps running. after
that, you send the SIGHUP signal to make uWSGI reload the app on each
worker as it finishes current requests.
--
Javier
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home