|Subject:||Re: monit-general Digest, Vol 98, Issue 11|
|Date:||Fri, 18 Mar 2011 11:14:25 -0700|
On Mar 16, 2011, at 7:16 AM, address@hidden wrote:
Thanks for the response.
Your suggestion could work for restart, however then I won't be able to actually start or stop daemons using monit.
I'm already using monit to monitor daemons of this type. I find that the daemon 'escapes' from monit after monit tries to restart it. I think this is happening because of the way the stop daemon works. I'm using the ruby gem daemons two wrap my daemon code. When the daemon gets a stop, it sets a flag and waits for the underlying code to exit gracefully (this is how the daemons package works). When monit executes stop and then start, the daemon can still be running when the start is issued. Monit is confused after that.
The daemons package supports a restart that simply shuts down the running daemon and when it has finished, it starts up a new one. I was hoping that monit would support that.
The initial restart is getting triggered because the daemon memory has grown large and I'm asking monit to restart it when it goes over some set limit. This seems to happen once a week or so. I fix it by going back to the machine and killing the running daemon, then use monit to start it so the daemon is actually running under monit again.
Any other ideas on how to handle this? Maybe someone else has integrated with the daemons package? http://daemons.rubyforge.org/
|[Prev in Thread]||Current Thread||[Next in Thread]|