diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-09-07 22:13:42 +0200 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-09-07 22:13:42 +0200 |
commit | 2456955dd3fb087ab2f063506502951bb52932a8 (patch) | |
tree | 8d0a71a05eb316b355d4d9b28e0391cf3a1a79b6 /server/mpm | |
parent | Sync CHANGES [skip ci]. (diff) | |
download | apache2-2456955dd3fb087ab2f063506502951bb52932a8.tar.xz apache2-2456955dd3fb087ab2f063506502951bb52932a8.zip |
mpm_event: Follow up to r1893014: log when children are not spawned.
Log at trace5 level when active_daemons >= active_daemons_limit and we won't
spawn children. Reset free_length to avoid negative value in this case too.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893073 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm')
-rw-r--r-- | server/mpm/event/event.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index bffa235a6f..2c2cd83a85 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -3238,7 +3238,18 @@ static void perform_idle_server_maintenance(int child_bucket, int num_buckets) free_length = retained->idle_spawn_rate[child_bucket]; } if (free_length + active_daemons > active_daemons_limit) { - free_length = active_daemons_limit - active_daemons; + if (active_daemons < active_daemons_limit) { + free_length = active_daemons_limit - active_daemons; + } + else { + ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf, + "server is at active daemons limit, spawning " + "of %d children cancelled: %d/%d active, " + "rate %d", free_length, + active_daemons, active_daemons_limit, + retained->idle_spawn_rate[child_bucket]); + free_length = 0; + } } if (retained->idle_spawn_rate[child_bucket] >= 8) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00486) |