I am having trouble getting Supervisor to properly monitor daemons that
have no output to STDOUT and STDERR.  Here is the [program:*] entry in
my conf file:

 

[program:memcached]
command=/development/memcached/memcached -d -p 11211 -m 128 -t 4
process_name=%(program_name)s
autostart=true
autorestart=true
startsecs=10
startretries=1
exitcodes=0
stopsignal=3
redirect_stderr=true
stdout_logfile=NONE

 

The supervisord log shows the following when started:

 

2011-01-20 10:00:52,238 INFO RPC interface 'supervisor' initialized
2011-01-20 10:00:52,239 CRIT Server 'unix_http_server' running without
any HTTP authentication checking
2011-01-20 10:00:52,240 INFO daemonizing the supervisord process
2011-01-20 10:00:52,242 INFO supervisord started with pid 599
2011-01-20 10:00:53,250 INFO spawned: 'memcached' with pid 600
2011-01-20 10:00:53,260 DEBG fd 7 closed, stopped monitoring
<POutputDispatcher at 47579216 for <Subprocess at 47174072 with name
memcached in state STARTING> (stdout)>
2011-01-20 10:00:53,260 INFO exited: memcached (exit status 0; not
expected)
2011-01-20 10:00:53,261 DEBG received SIGCLD indicating a child quit
2011-01-20 10:00:54,276 INFO spawned: 'memcached' with pid 607
2011-01-20 10:00:54,287 DEBG fd 7 closed, stopped monitoring
<POutputDispatcher at 47579216 for <Subprocess at 47174072 with name
memcached in state STARTING> (stdout)>
2011-01-20 10:00:54,287 INFO exited: memcached (exit status 0; not
expected)
2011-01-20 10:00:54,287 DEBG received SIGCLD indicating a child quit
2011-01-20 10:00:55,287 INFO gave up: memcached entered FATAL state, too
many start retries too quickly

 

When I change the memcached command to NOT run as a daemon (removing the
-d option) everything is fine.  If the memcached process quits with an
unexpected exit code Supervisor will spawn it back up.

 

In the future if I have a program that runs only in daemon mode how can
I get Supervisor to monitor it?

_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to