]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge a subset of r1363440 from trunk:
authorJeff Trawick <trawick@apache.org>
Wed, 15 Aug 2012 11:37:29 +0000 (11:37 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 15 Aug 2012 11:37:29 +0000 (11:37 +0000)
mpm_worker: Fix cases where the spawn rate wasn't reduced after
child process resource shortages.
(Note: mpm_event is omitted from this backport proposal because of
 missing prerequisite fixes.  Even mpm_worker has a tiny issue,
described in comments in the code.)

Submitted by: trawick
Reviewed by: rjung, rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1373342 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/mpm/worker/worker.c

diff --git a/CHANGES b/CHANGES
index 03a5084cc8a829cbb06f9a097dad19c2edc91332..ad14c507289ae519887cc0ce1c91f9d868ef4330 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ Changes with Apache 2.2.23
      envvars: Fix insecure handling of LD_LIBRARY_PATH that could lead to the
      current working directory to be searched for DSOs. [Stefan Fritsch]
 
+  *) mpm_worker: Fix cases where the spawn rate wasn't reduced after child
+     process resource shortages.  [Jeff Trawick]
+
   *) mpm_prefork: Reduce spawn rate after a child process exits due to
      unexpected poll or accept failure.  [Jeff Trawick]
 
diff --git a/STATUS b/STATUS
index 69304fbb3cc3ff5dbc323cb7cec1363020f849eb..73cc527395a27f9401de17f3d1b715e4027746a0 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -118,15 +118,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     2.2.x patch: http://people.apache.org/~jim/patches/mod_proxy_ajp-erroroverride.patch
     +1: igalic, jim, rpluem
 
-   * mpm_worker: Fix cases where the spawn rate wasn't reduced after
-     child process resource shortages.
-     (Note: mpm_event is omitted from this backport proposal because of
-     missing prerequisite fixes.  Even mpm_worker has a tiny issue,
-     described in the patch.)
-     trunk patch: http://svn.apache.org/viewvc?view=rev&rev=1363440
-     2.2.x patch: http://people.apache.org/~trawick/r1363440-worker-only-2.2.x.txt
-     +1: trawick, rjung, rpluem
-
    * mod_proxy_balancer: Restore balancing after a failed worker has
      recovered when using lbmethod_bybusyness.  PR 48735.
      trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1366344
index 11c7d89cdeeedc3a72c5c79aa3f159aceef52137..f13f639426fc19fee91d0fac86366807a97f3333 100644 (file)
@@ -1623,6 +1623,15 @@ static void server_main_loop(int remaining_children_to_start)
             }
             else if (ap_unregister_extra_mpm_process(pid.pid) == 1) {
                 /* handled */
+                if (processed_status == APEXIT_CHILDSICK) {
+                    /* resource shortage, minimize the fork rate */
+                    /* 2.2.x note: Unlike 2.4+, there's no way to verify that 
+                     * this child was part of the current generation, so we 
+                     * can't leave the spawn rate alone for sick children of
+                     * previous generations.
+                     */
+                    idle_spawn_rate = 1;
+                }
 #if APR_HAS_OTHER_CHILD
             }
             else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH,