Within Monit, when I configure a process to be dependent on another, and both those processes are part of the same group, if I restart the group, the dependant processes are restarted twice.
For instance, I might have process A and B (both in group GRP), with B being dependent on A. If I issue the command sudo monit restart -g GRP, B will restart twice.
CHECK PROCESS A WITH PIDFILE /path/A.pid GROUP GRP START PROGRAM = "start A" STOP PROGRAM = "stop A" CHECK PROCESS B WITH PIDFILE /path/B.pid GROUP GRP DEPENDS ON A START PROGRAM = "start B" STOP PROGRAM = "stop B"
I suspect this happens as Monit restarts each process in the group, but then as Monit restarts a process others are dependent on, those dependant processes are restart again.
Does Monit consider the dependencies when restarting groups? It looks like it might have to take them into consideration?
I’m running Monit 5.27.1.