httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject svn commit: r393868 - in /httpd/httpd/trunk/server/mpm: experimental/event/event.c worker/worker.c
Date Thu, 13 Apr 2006 17:53:06 GMT
Author: gregames
Date: Thu Apr 13 10:53:04 2006
New Revision: 393868

URL: http://svn.apache.org/viewcvs?rev=393868&view=rev
Log:
MaxClients isn't the only reason the scoreboard can fill up.  another
reason should be fixed soon.

also add a comment to explain an obscure line of code.

Modified:
    httpd/httpd/trunk/server/mpm/experimental/event/event.c
    httpd/httpd/trunk/server/mpm/worker/worker.c

Modified: httpd/httpd/trunk/server/mpm/experimental/event/event.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/experimental/event/event.c?rev=393868&r1=393867&r2=393868&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/experimental/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/experimental/event/event.c Thu Apr 13 10:53:04 2006
@@ -1705,6 +1705,10 @@
 
         if (i >= ap_max_daemons_limit
             && totally_free_length == idle_spawn_rate)
+            /* short cut if all active processes have been examined and
+             * enough empty scoreboard slots have been found
+             */
+        
             break;
         ps = &ap_scoreboard_image->parent[i];
         for (j = 0; j < ap_threads_per_child; j++) {
@@ -1795,15 +1799,23 @@
     }
     else if (idle_thread_count < min_spare_threads) {
         /* terminate the free list */
-        if (free_length == 0) {
+        if (free_length == 0) { /* scoreboard is full, can't fork */
             /* only report this condition once */
             static int reported = 0;
 
             if (!reported) {
-                ap_log_error(APLOG_MARK, APLOG_ERR, 0,
-                             ap_server_conf,
-                             "server reached MaxClients setting, consider"
-                             " raising the MaxClients setting");
+                if (active_thread_count >=
+                        ap_daemons_limit * ap_threads_per_child) {
+                    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;
             }
             idle_spawn_rate = 1;

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=393868&r1=393867&r2=393868&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Thu Apr 13 10:53:04 2006
@@ -1397,6 +1397,9 @@
         int all_dead_threads = 1;
 
         if (i >= ap_max_daemons_limit && totally_free_length == idle_spawn_rate)
+            /* short cut if all active processes have been examined and
+             * enough empty scoreboard slots have been found
+             */
             break;
         ps = &ap_scoreboard_image->parent[i];
         for (j = 0; j < ap_threads_per_child; j++) {
@@ -1488,15 +1491,23 @@
     }
     else if (idle_thread_count < min_spare_threads) {
         /* terminate the free list */
-        if (free_length == 0) {
+        if (free_length == 0) { /* scoreboard is full, can't fork */
             /* only report this condition once */
             static int reported = 0;
 
             if (!reported) {
-                ap_log_error(APLOG_MARK, APLOG_ERR, 0,
-                             ap_server_conf,
-                             "server reached MaxClients setting, consider"
-                             " raising the MaxClients setting");
+                if (active_thread_count >= 
+                        ap_daemons_limit * ap_threads_per_child) { 
+                    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;
             }
             idle_spawn_rate = 1;



Mime
View raw message