I have installed & configured supervisor.
ps -ax shows 10 processes such as:
php /home/vagrant/Sites/mysite/artisan queue:work --tries=1
However when I put something in queue it stays there and nothing happens. But if I run this command manually (even under vagrant user, exactly how it does supervisor) everything works.
I use Redis for keeping queues.
What can be the reason?
update
So, here is some additional info, since I really couldn't figure it out.
Laravel 5.5 version
Actually I have two supervisor configs for 2 projects. First one seemed to be working. Second doesn't. I mean, I can see the processes by ps -ax, but nothing happens. Both configs are identical:
[program:mysite-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/vagrant/Sites/mysite/artisan queue:work --tries=1
autostart=true
autorestart=true
user=vagrant
numprocs=10
redirect_stderr=true
stdout_logfile=/home/vagrant/Sites/mysite/worker.log
Also I couldn't figure out how can I enable and disabled some configs (like en2site for supervisord :) )
So, when I put something in the queue I can see it in redis. Then I manually run php /home/vagrant/Sites/mysite/artisan queue:work --tries=1 under vagrant user and queue jobs are dispatched and run. But only if I run the command manually =\
I was about the same problem.
The issue is apears becouse supervisor when call php /home/vagrant/Sites/mysite/artisan queue:work --tries=1
actualy not in project working directory, and artisan cant find .env file.
so you have some option to handle this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With