Commit 6d1552e4 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Merge a subset of r1363440 from trunk:

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
parent fc3dbbcb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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]

+0 −9
Original line number Diff line number Diff line
@@ -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
+9 −0
Original line number Diff line number Diff line
@@ -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,