httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] graceful stop?
Date Wed, 29 Jan 2003 09:06:21 GMT
>-----Original Message-----
>From: Ed L. []
>> > 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.

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 "",

	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 "",

	cp httpd_ACTIVE.conf httpd.conf
	apachectl graceful
	exit 0

And your active apache will resume.


Owen Boyle

PS You did ask for a workaround :-)

>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message