httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] graceful stop?
Date Wed, 29 Jan 2003 09:06:21 GMT
>-----Original Message-----
>From: Ed L. [mailto:httpd-users@bluepolka.net]
>
>> > I have need of a 'graceful stop' whereby existing requests are
>> > allowed to complete fully before each child httpd process exits. 
>> >
>> > Does such a thing exist?  If not, is there a known workaround?
>>
>> No graceful stop, but you can swap the config file for one that
>> provides no access and do a graceful restart, followed by a regular
>> stop when all the connections are finished.
>
>Bummer...

Not such a bummer - you simply make two config files: httpd_ACTIVE.conf
(your real config) and httpd_OFF.conf (which basically says "Deny from
all"). Then you make a simple shell script, called "graceful_stop.sh",
containing:

	#!/bin/sh
	cp httpd_OFF.conf httpd.conf
	apachectl graceful
	exit 0

When you execute this, your connections will die gracefully but no new
connections will be established. I don't know how you can check that all
pre-stop requests have been satisfied (tail the TransferLog?) However,
maybe you don't need to - an apache which Denies from all is
functionally equivalent to an apache which is not running :-)

Then to restart, you have a similar script "restart_apache.sh",
containing:

	#!/bin/sh
	cp httpd_ACTIVE.conf httpd.conf
	apachectl graceful
	exit 0

And your active apache will resume.

Rgds,

Owen Boyle

PS You did ask for a workaround :-)


>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message