Delay process start after it died
It seems it's not currently possible to delay process start if it has stopped, something like:
check process ... with pidfile ... start = "/etc/init.d/..." delay start 2 cycle
Which would mean then if process died, Monit should wait for 2 cycles (and recheck at that time if process still does not exist) before trying to start it.
This is useful for example if a process was manually restarted. Currently if you restart a process manually, there is a slight chance the process will be started two times - one time manually, and one time by monit (which noticed it was dead between start and stop).
For some software, like Resque this leads to problems (second instance for example could have no pidfile and will hang unnoticed until killed manually, in case of Resque)
Comments (2)
-
repo owner -
repo owner - changed status to resolved
supported already (see "if does not exist" statement)
- Log in to comment
You can just override implicit process existence test like this: