httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Prefork MPM Question
Date Mon, 21 Oct 2002 21:46:35 GMT
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}. Immediately after this, that external program sends some HTTP request which
should resolve to new VirtualHost added. 

> >> 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.
> Will do that and let you know.
> But I added some loging, so that when request comes PID is printed, and some request
shows old PID.
> Interestingly if I fire "MaxClients" no. of requests these old processes goes away.
> >
> >If that looks OK, maybe your external program just needs to sleep for a few
> >seconds after initiating the graceful restart.
> This external program sleeps for 20 secs after giving signal.
> If the server-status looks bad,
> >which platform are you on and what level of httpd are you running?
> I am on Solaris 8 and unfortunately using 1st GA release of 2.0 i.e 2.0.35. May be the
bug you are refering to was there 2.0.35, is this right ? if so then I need to patch my source
with fix.

Actually, it looks like the fix I'm thinking of was rev 1.88 of
server/mpm_common.c, which is part of 2.0.35.  So you might have something

Are you saying that you see this problem when there are very few/no incoming
connections, but it clears up when you send in MaxClients worth of http


View raw message