]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
decouple the two scoreboard full messages
authorGreg Ames <gregames@apache.org>
Fri, 14 Apr 2006 15:12:35 +0000 (15:12 +0000)
committerGreg Ames <gregames@apache.org>
Fri, 14 Apr 2006 15:12:35 +0000 (15:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394116 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/experimental/event/event.c
server/mpm/worker/worker.c

index 9bff9e30d9a6eb42e04c937ec0c2f08b6f13a0a5..8c2f797e613c23ebd31514d20ae6658097410e4a 100644 (file)
@@ -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;
         }
index 8d64860d95d3cfd4741ad24be5855fbef01622b2..a77a07b7f5e7ac68dde6a8011e85a904e4867660 100644 (file)
@@ -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;
         }