Hi Twisted Folks,

We use monit to start and stop our twistd daemons.  I have set up monit to
restart some of the daemons when they grow too large.  I use the following
command:

    /bin/bash -c 'kill -s SIGTERM `cat /var/run/sensrtunw/sensrtunw.pid`'

Occasionally, this is unsuccessful in killing the twistd process, and I
need to use a SIGKILL manually as a last resort.

Any ideas why?

I believe the SIGTERM method will do a clean shutdown, calling the
appropriate stopService methods.  This would be the preferred method.

The only thing that comes to mind is that the process does have a very few
threads ... I believe these are the database connections.  Could there be a
race condition that prevents twistd from stopping?  Shall I simply use
SIGKILL in all cases?

Suggestions or comments appreciated.
-Tom
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to