Re: Django gracefully shutdown
>
> Hello!
>
> After lot of work I'm ready to deploy my site on production. 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). Of course
> I can kill django-python-fcgi processes and restart everything again but
> is
> that correct? Can someone give me some hints please?
>
> Thanks!
>
There are various way to accomplish that in uWSGI. As always there is no
'one fit for all' solution so you have to evaluate yourself.
For example lot of people are satisfied with simple 'binary-patching'
approach (sending SIGHUP to the master) where the sockets are not closed
between reloads.
Other people (generally the ones with very high-loaded sites) cannot
tolerate the slowdown of the application during the reload, so they prefer
to spawn a whole new stack (with the new code) and simply move the
connections to the new one as soon as the new app is ready (and eventually
move back to the old instance if something is wrong)
This second approach requires a bit of effort (compared to the simple
SIGHUP approach) but is fore sure the most versatile.
Regarding fastcgi (read: flup, as fastcgi is only a communication
protocol) i do not think it is still "on par" with more modern solutions
like uWSGI, gunicorn and mod_wsgi.
Again, if you want a simple pure-python application server, gunicorn is a
better solution than flup (IMHO)
--
Roberto De Ioris
http://unbit.it
--
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