i think the problem is that the php program daemonizes itself. so pidproxy
doesn't know anything about the php children.
usually supervisor is mostly useful for programs that run in foreground.
try to disable the "auto daemonize" feature of your php program. if that's
not possible, then you'd better use monit than supervisord.
regards,
stephane
Le 27 février 2015 11:59:55 Joris Michaux <joris.mich...@france-pari.org> a
écrit :
Hello all,
I come to you after 2 days playing with supervisor, and have now a problem
with a PHP daemon witch auto fork into many child process.
My conf :
[program:MyDaemon.php]
command=/usr/bin/pidproxy /var/run/worker/MyDaemon.pid /usr/bin/nohup nice
-n 22 /usr/bin/php -f /data/www/core/bin/MyDaemon.php -- ARG --instance=ARG
--puid=ARG --guid=ARG
redirect_stderr=true
autorestart=true
startsecs=10
startretries=10
stopsignal=TERM
stopasgroup=true
killasgroup=true
priority=1
My result :
19737 ? S 0:00 \_ /usr/bin/python /usr/bin/pidproxy
/var/run/worker/MyWorker.pid /usr/bin/nohup nice -n 22 /usr/bin/php -f
/data/www/core/bin/MyDaemon.php -- ARG --instance=ARG --puid=ARG --guid=ARG
19738 ? SN 0:00 \_ /usr/bin/php -f
/data/www/core/bin/MyWorker.php -- ARG --instance=ARG --puid=ARG --guid=ARG
19743 ? SN 0:00 \_ /usr/bin/php -f
/data/www/core/bin/MyWorker.php -- ARG --instance=ARG --puid=ARG --guid=ARG
19744 ? SN 0:00 \_ /usr/bin/php -f
/data/www/core/bin/MyWorker.php -- ARG --instance=ARG --puid=ARG --guid=ARG
19745 ? SN 0:00 \_ /usr/bin/php -f
/data/www/core/bin/MyWorker.php -- ARG --instance=ARG --puid=ARG --guid=ARG
19746 ? SN 0:00 \_ /usr/bin/php -f
/data/www/core/bin/MyWorker.php -- ARG --instance=ARG --puid=ARG --guid=ARG
So it seems that my daemon has been properly monitored, but a stop command
will not kill child process... So supervisor restart my worker with news
childs, and let 4 zombies...
Is my configuration wrong ? Or should I look into the worker code to term
himself his childs ?
Thanks by advance.
Regards,
Joris
----------
_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
https://lists.supervisord.org/mailman/listinfo/supervisor-users
_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
https://lists.supervisord.org/mailman/listinfo/supervisor-users