Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why supervisor faild to start the program?

I am working with laravel queue jobs with Redis and using supervisor to manage multiple workers.
I have more than one numprocs which working perfectly for some days and then the supervisor goes down even if the supervisor in active state.

Because in supervisor, when supervisord fails more than startretries value set in configure file to start program/worker then the program/worker goes to FATAL STATE then it will not processing any jobs, So when all workers gone on this state the supervisor goes down. Then we need to restart the Supervisor manually to start processing again.

But this is not a proper solution for this.
My question is why supervisor fail to start and what is the solution for that ?
Reference Supervisor Doc:-http://supervisord.org/subprocess.html
My config file like this:-

[program:name]
process_name=%(program_name)s_%(process_num)02d
command=php /path/artisan queue:work --queue=queue1,queue2,queue3,queue4,default --tries=1 --daemon
autostart=true
autorestart=true
startretries=15
numprocs=150
user=root
redirect_stderr=true
stdout_logfile=/path/worker.log
stderr_logfile=/path/workerError.log

Update
My log file look like this enter image description here

My stdout log file looks like this

enter image description here Any help will be greatly appreciated.

like image 481
Bibhudatta Sahoo Avatar asked Feb 01 '18 07:02

Bibhudatta Sahoo


1 Answers

The relevant log entries are:

 exited: laravelw_106 (exit status 0; not expected)
gave up: laravelw_106 entered FATAL state, ntoo many start retries too quickly

The laravel queue worker stops immediately for some reason after being started. The queue worker is supposed to be long-running.

You need to find out why it exits; maybe you have an exit() or die() statement somewhere in your jobs.

like image 190
cweiske Avatar answered Sep 23 '22 03:09

cweiske