5

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?

1 Answer 1

5

I had the same problem using CentOS 6 with supervisor 2. I will assume you run a similar configuration.

In my case, upgrading solved the problem. However, there are no available up to date supervisord binary package for my system. So here is how I have updated:

First, download the following source RPM supervisor-3.0-0.5.a10.fc16.src.rpm (available here: http://dl.fedoraproject.org/pub/fedora/linux/releases/16/Everything/source/SRPMS/supervisor-3.0-0.5.a10.fc16.src.rpm). If you try a more recent source package, the build might fail and you might run into a dependencies hell.

Install rpm-build package using:

yum install rpm-build

Then try to build using the following command,

rpmbuild --rebuild supervisor-3.0-0.5.a10.fc16.src.rpm

If this fails, install any needed dependency using yum.

yum install <dependencies>

Then try to build again:

rpmbuild --rebuild supervisor-3.0-0.5.a10.fc16.src.rpm

You will then be able to install supervisord and the problem will disappear !

yum install ~/rpmbuild/RPMS/noarch/supervisor-3.0-0.5.a10.el6.noarch.rpm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .