I would actually suggest using gunicorn to run django as a stand-along app 
server listening on localhost:some-local-port, and use nginx proxy passing 
to redirect queries to / to the local port.

But that said, once a request is served, the listening processes are 
essentially idle. So, either just shut down enginx, or set up a redirect to 
a "we're under maintenance" page, so the requests dont go through to 
django, or if you're running gunicon, shutting that down will let the 
existing requests complete, then detach... so nginx wont have a proxyport 
to connect to.

fastcgi is pretty "old" now, and my personal opinion is that it should 
probably be avoided. gunicon can talk directly to a wsgi application, so 
its just about a drop-in replacement.


On Friday, December 7, 2012 12:25:55 PM UTC-8, Odagi wrote:
>
>
> 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!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/EDwkoPKnxeAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to