![](https://secure.gravatar.com/avatar/d95ae6b8519db9ee20dda8c5070e403f.jpg?s=120&d=mm&r=g)
On 16 July 2011 04:58, Christopher Armstrong <radix@twistedmatrix.com> wrote:
On Fri, Jul 15, 2011 at 10:49 PM, Viatcheslav Gachkaylo <vgachkaylo@gmail.com> wrote:
be always uptime and relaunch on fatal error. I am sure there is a common procedure for this. I like using Supervisor (http://supervisord.org/) for this purpose, running with "twistd -n".
Also don't forget twisted.runner.procmon and twistd procmon - it hasn't got all the features of supervisord, but it may be enough. eg twistd --logfile=procmon.log --pidfile=procmon.pid procmon \ twistd --logfile=web.log --pidfile=web.pid -n web --path . {{{ $ twistd procmon --help Usage: twistd [options] procmon [procmon options] commandline Options: -t, --threshold= How long a process has to live before the death is considered instant, in seconds. [default: 1] -k, --killtime= How long a process being killed has to get its affairs in order before it gets killed with an unmaskable signal. [default: 5] -m, --minrestartdelay= The minimum time (in seconds) to wait before attempting to restart a process [default: 1] -M, --maxrestartdelay= The maximum time (in seconds) to wait before attempting to restart a process [default: 3600] --version --help Display this help and exit. procmon runs processes, monitors their progress, and restarts them when they die. procmon will not attempt to restart a process that appears to die instantly; with each "instant" death (less than 1 second, by default), it will delay approximately twice as long before restarting it. A successful run will reset the counter. }}} -RichardW.