Supervisord adding multiple processes for PHP and Gearman

前端 未结 1 460
陌清茗
陌清茗 2021-02-04 21:38

I recently set up Ubuntu Natty with PHP5-FPM, Gearman, and Supervisor. I\'ve edited my Supervisord config to run a Gearman worker.

[program:gearman] 
command=/us         


        
1条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-04 22:14

    I always include the stopsignal config option for my supervisor config files. This allows the gearman process to be killed when a stop is requested. Try this:

    [program:gearman] 
    command=/usr/bin/php php_gearman_worker.php
    numprocs=1 
    directory=/root/sandbox
    stdout_logfile=/root/sandbox/supervisord.log 
    environment=GEARMAN_USER=gearman 
    autostart=true
    autorestart=true
    user=gearman
    stopsignal=KILL
    

    0 讨论(0)
提交回复
热议问题