我正在使用SupervisorD在守护程序模式下运行Lumen队列。流明作业成功运行,但SupervisorD崩溃。
laravel-worker_11: ERROR (abnormal termination)
laravel-worker_10: ERROR (abnormal termination)
laravel-worker_00: ERROR (abnormal termination)
如果我在主管会议conf中添加 startsecs = 0 ,它将开始不断生成工作程序,而不是在所有工作中重复使用同一工作程序。
2019-03-06 10:02:28,637 INFO spawned: 'laravel-worker_01' with pid 31529
2019-03-06 10:02:28,638 INFO success: laravel-worker_01 entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2019-03-06 10:02:28,777 INFO exited: laravel-worker_02 (exit status 1; expected)
这导致服务器上的负载。理想情况下,由于恶魔模式,Supervisor应该只生成一个进程并继续从中处理所有作业。
主管配置
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/web/artisan queue:work --queue=server_level,app_level --tries=1 --daemon
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stdout_logfile=/var/www/web/storage/logs/worker.log
startsecs=0
exitcodes=0,1,2