I've setup a supervisor successfully (CentOS release 6.6
) for beanstalk queue and it was working before but suddenly after changing the password, it's not working anymore. I did it (setup) as root
user but now whenever I add a job in the queue
it fails and following trace is available in the log file:
2014-12-03 00:45:36,017 INFO RPC interface 'supervisor' initialized
2014-12-03 00:45:36,017 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-12-03 00:45:36,017 INFO daemonizing the supervisord process
2014-12-03 00:45:36,017 INFO supervisord started with pid 31309
2014-12-03 00:45:37,022 INFO spawned: 'queue' with pid 31317
2014-12-03 00:45:38,023 INFO success: queue entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Right now the supervisord.conf
contains following configuration:
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
[supervisord]
logfile=/tmp/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=info
pidfile=/tmp/supervisord.pid
nodaemon=false
minfds=1024
minprocs=200
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
[program:queue]
command=/usr/local/bin/php artisan queue:listen --tries=3 --timeout=86400 --sleep=60
directory=/home/***/www/*** // Real path removed for this question
autostart=true
autorestart=true
redirect_stderr=true
I've tried everything as I could, restarted the program
and reloaded the supervisor
several times but no luck. What can I do now to make it working again?
Update: If I run the php artisan queue:work
from terminal manually then it works on foreground.
Try
$ ps aux | grep artisan # get artisan PID
$ sudo kill -2 <PID>
$ ps aux | grep artisan # verify artisan has shutdown properly - if not use kill -9 in previous step
Sometimes supervisorctl
has problems shutting down processes. It may be because the process doesn't listen to SIGINT/SIGTERM or because the process has hung. In either case kill -9
should brute force kill it, and then you can use supervisorctl start program