<div>Hi Twisted Folks,</div><div><br></div><div>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:</div><div><br></div>
<div> /bin/bash -c 'kill -s SIGTERM `cat /var/run/sensrtunw/sensrtunw.pid`'</div><div><br></div><div>Occasionally, this is unsuccessful in killing the twistd process, and I need to use a SIGKILL manually as a last resort.</div>
<div><br></div><div>Any ideas why?</div><div><br></div><div>I believe the SIGTERM method will do a clean shutdown, calling the appropriate stopService methods. This would be the preferred method.</div><div><br></div><div>
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?</div>
<div><br></div><div>Suggestions or comments appreciated.</div><div>-Tom</div><div><br></div><div><br></div><div><br></div>