Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Supervisor FATAl Exited too quickly (process log may have details)

I am using supervisor in laravel some time my supervisor work fine and some time got error. FATAl Exited too quickly (process log may have details).

This is my supervisor file.

[program:laravel-worker-mail]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/new-project/artisan queue:work mongodb --sleep=10 --tries=3
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/html/new-project//storage/logs/worker.log

Please suggest me if anybody have good idea about this.

like image 504
Sachin Solanki Avatar asked Dec 01 '16 11:12

Sachin Solanki


3 Answers

In my case, the supervisor was exiting very fast because it was finishing before the startsecs and since startsecs wasn't defined, it uses the default which is 1.

Setting startsecs=0 fixed my issue.

like image 186
nacojohn Avatar answered Oct 27 '22 02:10

nacojohn


I solved the problem myself by searching and applying a number of methods, I found my solution by adding --daemon in command updated code below

[program:laravel-worker-mail]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/new-project/artisan queue:work mongodb --sleep=10 --tries=3 --daemon
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/html/new-project/storage/logs/worker.log
like image 6
Sachin Solanki Avatar answered Oct 27 '22 00:10

Sachin Solanki


For anyone still having the same issue despite following the accepted answer. It turned out that I was referencing the wrong queue method "sqs" instead of the one I was using which was "database".

command=php /var/www/html/new-project/artisan queue:work database --sleep=10 --tries=3 --daemon

[program:laravel-worker-mail]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/new-project/artisan queue:work database --sleep=10 --tries=3 --daemon
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/html/new-project/storage/logs/worker.log
like image 3
Savlon Avatar answered Oct 27 '22 00:10

Savlon