]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Correctly decrement active_daemons also in the case that the child
authorRuediger Pluem <rpluem@apache.org>
Wed, 22 Sep 2021 18:48:25 +0000 (18:48 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 22 Sep 2021 18:48:25 +0000 (18:48 +0000)
  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

changes-entries/pr65592.txt [new file with mode: 0644]
server/mpm/event/event.c

diff --git a/changes-entries/pr65592.txt b/changes-entries/pr65592.txt
new file mode 100644 (file)
index 0000000..5b256e3
--- /dev/null
@@ -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]
index eeb062b74d3fd26394b61fbae5fdf19a324eab34..aa6304042a6be20b729021960f83ee040ed3ef9a 100644 (file)
@@ -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 / "