Anyone?
Supervisor queue:work failing
I set up a worker with supervisor on a site a while back which is supposed to send out emails on dates chosen by customers. It seems to have stopped working at some point as a couple of jobs in my database 'jobs' table were meant to go out today and didn't.
I checked the worker.log file and there are hundreds of lines saying things along the lines of:
[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_s
chema.tables where table_schema = homestead and table_name = site_settings)
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2002] Connection refused
my supervisor/conf.d/laravel-worker.conf file looks like this:
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/site/artisan queue:work --sleep=10 --tries=3
autostart=true
autorestart=true
user=root
numprocs=3
redirect_stderr=true
stdout_logfile=/var/www/site/storage/supervisor/worker.log
If I run "cd /var/www/site/" then "php artisan queue:work" from ssh the jobs go out as they should. Any ideas? It seems really tough to debug stuff like this. Also is there any way I can monitor this so that I don't have to rely on the unhappy customers letting me know an email never turned up
I was thinking that maybe the problem is caused by supervisor not restarting things after a server or database crash/reboot?
Please or to participate in this conversation.