From: Greg Ames Date: Fri, 14 Apr 2006 15:12:35 +0000 (+0000) Subject: decouple the two scoreboard full messages X-Git-Tag: 2.3.0~2451 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f83736b37a66994bdba8a55b8509db460bd0dfc;p=thirdparty%2Fapache%2Fhttpd.git decouple the two scoreboard full messages git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394116 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/experimental/event/event.c b/server/mpm/experimental/event/event.c index 9bff9e30d9a..8c2f797e613 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 8d64860d95d..a77a07b7f5e 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; }