From 9f83736b37a66994bdba8a55b8509db460bd0dfc Mon Sep 17 00:00:00 2001 From: Greg Ames Date: Fri, 14 Apr 2006 15:12:35 +0000 Subject: [PATCH] decouple the two scoreboard full messages git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394116 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/experimental/event/event.c | 21 ++++++++++----------- server/mpm/worker/worker.c | 21 ++++++++++----------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/server/mpm/experimental/event/event.c b/server/mpm/experimental/event/event.c index 9bff9e30d9..8c2f797e61 100644 --- a/server/mpm/experimental/event/event.c +++ b/server/mpm/experimental/event/event.c @@ -1800,23 +1800,22 @@ static void perform_idle_server_maintenance(void) else if (idle_thread_count < min_spare_threads) { /* terminate the free list */ if (free_length == 0) { /* scoreboard is full, can't fork */ - /* only report this condition once */ - static int reported = 0; - if (!reported) { - if (active_thread_count >= - ap_daemons_limit * ap_threads_per_child) { + if (active_thread_count >= ap_daemons_limit * ap_threads_per_child) { + static int reported = 0; + if (!reported) { + /* only report this condition once */ ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "server reached MaxClients setting, consider" " raising the MaxClients setting"); + reported = 1; } - else { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, - ap_server_conf, - "scoreboard is full, not at MaxClients"); - } - reported = 1; + } + else { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, + ap_server_conf, + "scoreboard is full, not at MaxClients"); } idle_spawn_rate = 1; } diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 8d64860d95..a77a07b7f5 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -1492,23 +1492,22 @@ static void perform_idle_server_maintenance(void) else if (idle_thread_count < min_spare_threads) { /* terminate the free list */ if (free_length == 0) { /* scoreboard is full, can't fork */ - /* only report this condition once */ - static int reported = 0; - if (!reported) { - if (active_thread_count >= - ap_daemons_limit * ap_threads_per_child) { + if (active_thread_count >= ap_daemons_limit * ap_threads_per_child) { + static int reported = 0; + if (!reported) { + /* only report this condition once */ ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "server reached MaxClients setting, consider" " raising the MaxClients setting"); - } - else { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, - ap_server_conf, - "scoreboard is full, not at MaxClients"); + reported = 1; } - reported = 1; + } + else { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, + ap_server_conf, + "scoreboard is full, not at MaxClients"); } idle_spawn_rate = 1; } -- 2.50.1