You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by gr...@apache.org on 2002/10/18 19:11:23 UTC

Re: Prefork MPM Question

amit athavale wrote:

> I am using Apache 2.0 with prefork MPM. There is some external program which adds VirtualHosts to httpd.conf dynamically and send SIGUSR1 to a process with pid = {pid in httpd.pid}. Immediately after this, that external program sends some HTTP request which should resolve to new VirtualHost added. (These are WebDAV requests to create some default resources and set properties)
> 
> But unfortunately, these requests go to old processes(before restarting). Is there any way to ensure that these requests go to new processes ?

There could be a graceful restart bug (we did have one in prefork months ago),
or it might be that the graceful restart notification simply hasn't had time to
propagate to all the child processes.   

I would take a close look at server-status with ExtendedStatus enabled, before
and right after you send the signal.  For each child pid that's alive, you
should see either a new generation number in the "Srv" column or a G (gracefully
finishing) in the "M" column.  When we had the bug, you would see processes with
the old generation number serving new requests for hours after the graceful
restart was initiated.

If that looks OK, maybe your external program just needs to sleep for a few
seconds after initiating the graceful restart.  If the server-status looks bad,
which platform are you on and what level of httpd are you running?

Greg