Re:Setting up Django with gunicorn, nginx, supervisord and f...
by dennyabraham on Monday June 27, 2011 @09:50AM
(#2701261)
I'm unfamiliar with python and supervisord, but is supervisord able to manage the status of gunicorn and its child processes without explicitly being given the gunicorn pid? I've been investigating doing the same in Rails (I'll likely use bluepill) and I'd like to understand how this is done in the python ecosystem.
[ Parent
| on HN ]
Re:Setting up Django with gunicorn, nginx, supervisord and f...
by conesus on Monday June 27, 2011 @10:03AM
(#2701307)
Supervisor is responsible for starting the gunicorn process, so it knows the PID when it starts it. Gunicorn controls its own PID file, but supervisor can send it process signals.
Here's my sample Supervisord conf file for gunicorn:
[program:gunicorn]
directory=/home/sclay/newsblur
command=gunicorn_django -c config/gunicorn_conf.py
user=sclay
autostart=true
autorestart=true
#redirect_stderr=True
priority=991
stopsignal=HUP
Hope that helps.
Re:Setting up Django with gunicorn, nginx, supervisord and f...
by dennyabraham on Monday July 04, 2011 @10:09AM
(#2726570)
thanks!