after child process resource shortages.
The broken scenario:
child X exits with APEXIT_CHILDSICK
another child Y is created and reuses child X's scoreboard slot
child X's exit status is processed
The case that worked is when child X's scoreboard slot hadn't
been reused by the time that its exit status was processed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1363440 13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mpm_event, 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]
event_note_child_killed(-1, /* already out of the scoreboard */
pid.pid, old_gen);
+ if (processed_status == APEXIT_CHILDSICK
+ && old_gen == retained->my_generation) {
+ /* resource shortage, minimize the fork rate */
+ retained->idle_spawn_rate = 1;
+ }
#if APR_HAS_OTHER_CHILD
}
else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH,
else if (ap_unregister_extra_mpm_process(pid.pid, &old_gen) == 1) {
worker_note_child_killed(-1, /* already out of the scoreboard */
pid.pid, old_gen);
+ if (processed_status == APEXIT_CHILDSICK
+ && old_gen == retained->my_generation) {
+ /* resource shortage, minimize the fork rate */
+ retained->idle_spawn_rate = 1;
+ }
#if APR_HAS_OTHER_CHILD
}
else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH,