Forum OpenACS Q&A: Re: My production site is down

Collapse
Posted by Tom Jackson on

From the looks of it Monit doesn't restart a zombie process, although it will send you a nice email. But just to clear things up: there is no configuration associated with supervise, you just make the package and link the directory with your run file to the /service directory.

Every program has a startup script, or at least a command you have to run to start it, so it isn't surprising that both Monit and supervise use them.

Monit requires that your script, or your program create a pid file, and that it gets deleted when the process dies or is stopped.

Monit requires a configuration section for each process, something like the following (for sshd):

 check sshd with pidfile /var/run/sshd.pid
   start program  "/etc/init.d/sshd start"
   stop program  "/etc/init.d/sshd stop"
   host 192.168.1.1 port 22 protocol ssh
   timeout(5, 5)
   alert foo@bar
   alert 123456@sms on { timeout }