From: Greg Ames Date: Tue, 31 Jul 2001 06:22:32 +0000 (+0000) Subject: don't count workers in processes which aren't actively serving requests. X-Git-Tag: 2.0.23~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f61f91fc7028d096f8cc7ad41507fbce95faf851;p=thirdparty%2Fapache%2Fhttpd.git don't count workers in processes which aren't actively serving requests. it is necessary to check for the generation as well as "quiescing", in the case of a restart where no workers have seen the PoD yet. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89821 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 1b63ba0c79c..d9d1fff2467 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,10 @@ Changes with Apache 2.0.23-dev + + *) More stall fixes for the threaded & worker mpm's. + Make mod_status output more accurate. Don't + count workers in processes which aren't actively + serving requests. [Greg Ames] + *) Win32: Get SSI exec cgi tag working. [Bill Stoddard] *) Add a single listener/multiple worker MPM. This MPM is diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 226b0662f2d..b713ee3cb79 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -321,7 +321,9 @@ static int status_handler(request_rec *r) ps_record = ap_scoreboard_image->parent[i]; res = ws_record.status; stat_buffer[indx] = status_flags[res]; - if (!ps_record.quiescing && ps_record.pid) { + if (!ps_record.quiescing && + ps_record.generation == ap_my_generation && + ps_record.pid) { if (res == SERVER_READY) ready++; else if (res != SERVER_DEAD && res != SERVER_IDLE_KILL) diff --git a/server/mpm/threaded/threaded.c b/server/mpm/threaded/threaded.c index 527df540907..8cf6db30c68 100644 --- a/server/mpm/threaded/threaded.c +++ b/server/mpm/threaded/threaded.c @@ -1010,6 +1010,7 @@ static void perform_idle_server_maintenance(void) */ if (status <= SERVER_READY && status != SERVER_DEAD && !ps->quiescing && + ps->generation == ap_my_generation && /* XXX the following shouldn't be necessary if we clean up * properly after seg faults, but we're not yet GLA */ diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 8e6f1aaaf39..88063cdbbd0 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -1058,6 +1058,7 @@ static void perform_idle_server_maintenance(void) */ if (status <= SERVER_READY && status != SERVER_DEAD && !ps->quiescing && + ps->generation == ap_my_generation && /* XXX the following shouldn't be necessary if we clean up * properly after seg faults, but we're not yet GLA */