Setting Laravel's Queue with Supervisor
Setting Laravel's Queue with Supervisor
Jason Jason Photo By Jason Jason, Aug 22, 2016

After upgrading our servers from Ubuntu 14.04 LTS to Ubuntu 16.04 LTS, it seemed like just about everything needed to be checked to make sure it was working. I just wrote a brief article on how to get PHP 7 up and running on Ubuntu 16.04, and after verifying that all my websites were up and running, it was time to make sure all the queued jobs were being executed properly. Laravel has a queue process that I like to manage with a program called Supervisor. Normally, supervisor seems to work great, but after upgrading and rebooting, it seemed like none of Laravel's queued jobs were running. Here are the steps I took to get everything back up.


sudo apt-get purge supervisor

sudo apt-get install supervisor

sudo service supervisor start

sudo supervisorctl reread

sudo supervisorctl update

sudo supervisorctl start laravel-worker:*

Sample Worker File

This should be saved in /etc/supervisor/conf.d/jj.conf

command=php /var/www/jj/laravel/artisan queue:work database --sleep=3 --tries=3 --daemon --queue=high,default,low


Tags & Categories

Laravel Command Line Linux PHP