|
From: | Jan-Henrik Haukeland |
Subject: | Re: no webserver restart on reload |
Date: | Thu, 18 Aug 2005 14:16:48 +0200 |
On 18. aug. 2005, at 12.10, martin rueegg [metaworx rueegg] wrote:
when reloading monit, the webserver is restarted. during this time, no other client can connect to the daemon, that's obvious. the problem is, that the client will not be able to connect and therefore fail entirely with it's command. could it be done the way that httpd is only restared if it's configuration is affected by the reload. otherwise it will only temporaryly disable the handling of requests by returning a http status code of 503 with a retry-after <configurable value>.
Not a bad idea, but the problem is that after a restart the HTTP port could be changed in the control file so we MUST restart the http- server thread in case we now must bind to a different port number. Otherwise, this would be a good solution.
the monit client on the other hand should retry to send his request upon reception of a 503 status code for n-times where n is again a <config value> (or in monitrc or as a command line option).
Again, since the HTTP port number could be changed, the monit client also must re-read the control file and cannot retry against the same port.
I think you must solve this problem outside of monit or change your own copy of monit. What you suggest is certainly possible to do in monit if the HTTP port number never changes.
-- Jan-Henrik Haukeland Mobil +47 97141255
[Prev in Thread] | Current Thread | [Next in Thread] |