Dakait
Dakait

Reputation: 2620

Supervisor 3.3.1 running but not processing jobs

I have setup supervisor

[program:laravel_queue]
process_name=%(program_name)s_%(process_num)02d
command=php /usr/local/bin/run_queue.sh
startsecs = 0
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log

run_queue.sh

#!/bin/bash
php /var/www/html/application/artisan  --timeout=240 queue:work --tries=1

enter image description here

log file looks like this

enter image description here

but job table is filling up, its not processing any jobs. Any help in this regard is appreciated

Upvotes: 0

Views: 2244

Answers (1)

Dakait
Dakait

Reputation: 2620

I did some changes to make it work i am not really sure what actually made it work but here are steps:

I removed dependency on run_queue.sh and moved command inside laravel_queue.conf

[program:laravel_queue]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/application/artisan queue:work --tries=1
startsecs = 0
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log

also if you notice i changed command a little bit from

--timeout=240 queue:work --tries=1

to

queue:work --tries=1 (this made it work in my opinion)

after making these changes i ran following commands:

sudo supervisorctl reread & sudo supervisorctl update
sudo supervisorctl start laravel_queue:*

Upvotes: 4

Related Questions