Hi all,

You're right, the daemon is forking himself, but I thought pidproxy was
able to find child processes with pid file. Misunderstood. My bad.

I have no reason to let the process fork himself, it has been written
like that, but I'll ask to modify it to let supervisor manage multiple
instances.

Thanks a lot for yours anwers.

I go back playing with supervisord !!

Regards,
Joris


On 27/02/2015 19:32, Jonathan Stewmon wrote:
> The daemon process is responsible for trapping the signal from supervisor,
> and [in your case, is sounds like you want to] forwarding that signal to
> its children.
> 
> But, is there a reason why you need to use fork to create the workers?
> Supervisor can start as many instances of a program as you want based on
> the numprocs program option. If you let supervisor create the workers, it
> will manage signaling the worker instances.
> 
> On Fri, Feb 27, 2015 at 3:05 AM, Joris Michaux <
> joris.mich...@france-pari.org> wrote:
> 
>> 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
> 


-- 
*Joris MICHAUX*
Ingénieur systèmes et réseaux
*Skype:* h4mm3r.toxyc
----
425, rue Jean Rostand
31670 Labège, France
*Tel:* +33 (0)5 82 08 07 31
www.france-pari.fr - www.sportnco.com
----
*Social:*
[facebook]
https://www.facebook.com/pages/France-Pari/
[twitter]
https://twitter.com/FrancePari
[linkedin]
http://www.linkedin.com/company/france-pari
[scoop.it]
http://www.scoop.it/t/paris-sportifs-1
_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to