We run Tornado + Nginx with the supervisor as the supervisor.
Configuration Example (names changed)
[program:server] process_name = server-%(process_num)s command=/opt/current/vrun.sh /opt/current/app.py --port=%(process_num)s stdout_logfile=/var/log/server/server.log stderr_logfile=/var/log/server/server.err numprocs = 6 numprocs_start = 7000
I have not yet been able to find the βbestβ way to restart what I will probably finally do is to have an βactiveβ Nginx file that is updated, letting HAProxy know that we are messing with the configuration, and then wait for a bit, swap , then turn it on again.
We use Capistrano (we have the backlog task to go to Fabric), but instead of dealing with deleting * .pyc files, we refer to symlink / opt / current with the release identifier.
koblas
source share