From: Ruediger Pluem Date: Wed, 22 Sep 2021 18:48:25 +0000 (+0000) Subject: * Correctly decrement active_daemons also in the case that the child X-Git-Tag: 2.5.0-alpha2-ci-test-only~791 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8720881b0634383145e87334f1456cbcab4cb6cc;p=thirdparty%2Fapache%2Fhttpd.git * Correctly decrement active_daemons also in the case that the child process decides on its own to die because of MaxRequestsPerChild. PR: 65592 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893520 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/pr65592.txt b/changes-entries/pr65592.txt new file mode 100644 index 00000000000..5b256e38c08 --- /dev/null +++ b/changes-entries/pr65592.txt @@ -0,0 +1,3 @@ + *) event mpm: Correctly count active child processes in parent process if + child process dies due to MaxConnectionsPerChild. + PR 65592 [Ruediger Pluem] diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index eeb062b74d3..aa6304042a6 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -3118,6 +3118,10 @@ static void perform_idle_server_maintenance(int child_bucket, int num_buckets) } ps = &ap_scoreboard_image->parent[i]; if (ps->pid != 0) { + if (ps->quiescing == 1) { + ps->quiescing = 2; + active_daemons--; + } for (j = 0; j < threads_per_child; j++) { ws = &ap_scoreboard_image->servers[i][j]; status = ws->status; @@ -3197,7 +3201,6 @@ static void perform_idle_server_maintenance(int child_bucket, int num_buckets) ap_mpm_podx_signal(retained->buckets[child_bucket].pod, AP_MPM_PODX_GRACEFUL); retained->idle_spawn_rate[child_bucket] = 1; - active_daemons--; } else { ap_log_error(APLOG_MARK, APLOG_TRACE5, 0, ap_server_conf, "Not shutting down child: total daemons %d / "