On Sep 5, 2007, at 6:47 PM, Jason L. Buberel wrote:
Jan-Henrik, Stanislaw,
Thanks for your thoughtful consideration/response.
Question #1) Maybe start time is not the crucial point here, but
rather "correctness", that is, monit should wait for A to come up
before starting B and so on?
My Answer) My preference would trust the start/stop script with the
responsibility of determining when it has completed its processing and
the service is fully started or stopped. Monit's approach - detecting
the presence of the PID and the process - takes that responsibility
away from the script. For most services, that assumption is a safe
one. But there are many cases of more complex services for which
process creation and PID file creation happen well before that service
is fully started. For that reason, I would vote in favor of making all
start/stop actions synchronous.
If you are concerned with start/stop scripts taking too long to
completed, I would suggest the use of a timeout value:
check process tomcat with pidfile /var/run/tomcat.pid
stop program with timeout 30 seconds = "/etc/init.d/tomcat stop"
start program with timeout 30 seconds = "/etc/init.d/tomcat start"
If the start/stop script does not exit within the timeout period, the
execution attempt should be considered to have failed.
Both these features are implemented now (will be part of next monit
version):
- stop and start are synchronous
- it is possible to define stop and start timeout
Martin
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general