I'm testing Gearman on a dedicated job-server (Ubuntu 12.04) for my PHP project (using pecl/gearman as the PHP impementation).
Manually this works fine: starting up the client, adding jobs and running one or more workers in separate shells works as intended. Now I want to run the workers using Supervisord, but this generates a lot of the following errors in the Gearman log:
WARNING [ 4 ] lost connection to client recv(peer has closed connection) 127.0.0.1:37126 -> libgearman-server/io.cc:608
ERROR [ 4 ] Failed while in _connection_read() -> libgearman-server/io.cc:489
The supervisor conf is default, I just added a program:
[program:migration]
command=/path/to/script
process_name=%(program_name)s_%(process_num)02d
numprocs=10
stdout_logfile=/var/log/gearman.log
stderr_logfile=/var/log/gearman-error.log
stdout_logfile_maxbytes=1MB
environment=GEARMAN_USER=gearman
autostart=true
autorestart=true
user=gearman
stopsignal=KILL
Gearman process information:
gearman 9802 0.0 0.0 476116 1780 ? Ssl 12:18 0:00 /usr/sbin/gearmand --pid-file=/var/run/gearman/gearmand.pid --user=gearman --daemon --log-file=/var/log/gearman-job-server/gearman.log --listen=127.0.0.1
When testing supervisor:
supervisord -n -c /etc/supervisor/supervisord.conf
I'm kind of stuck here, since the error message doesn't really return results on Google. Any help is appreciated.