I'm running several PHP CLI scripts and monitoring them via Supervisor.
When I use supervisorctl
to monitor them, the scripts show like this:
cleanup RUNNING pid 1805, uptime 0:00:41
postsales RUNNING pid 1825, uptime 0:00:10
rebills RUNNING pid 1823, uptime 0:00:19
subscribers RUNNING pid 1827, uptime 0:00:10
However, when I issue a stop all
, supervisorctl freezes, and I need to CTRL+C to exit.
When I next run supervisorctl
, the status then looks like this:
cleanup RUNNING pid 1935, uptime 0:00:44
postsales RUNNING pid 1953, uptime 0:00:05
rebills STOPPED Jul 19 12:23 PM
subscribers RUNNING pid 1951, uptime 0:00:05
i.e. only ONE of the processes has stopped and the others continue to run.
If I issue more stop all
commands, the same thing happens - one script attempts to exit, and the rest hang.
I've tried modifying the supervisord.conf file to use STOPSIGNAL=KILL
in case the PHP script is not properly handling the default TERM signal, but the same thing happens.
Is there any way to reliably use supervisorctl with my scripts to properly start and stop them at will?