Sorry, my email client mangled that patch.  Trying another
one:

Index: server/mpm/worker/worker.c
===================================================================
--- server/mpm/worker/worker.c  (revision 756126)
+++ server/mpm/worker/worker.c  (working copy)
@@ -1509,15 +1509,27 @@
         /* terminate the free list */
         if (free_length == 0) { /* scoreboard is full, can't fork */
 
-            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;
+            if (active_thread_count >= ap_daemons_limit * 
ap_threads_per_child) {
+                /* no threads are "inactive" - starting, stopping, etc. */
+                /* Are all threads in use? */
+                if (0 == idle_thread_count) {
+                    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 {
+                    static int reported = 0;
+                    if (!reported) {
+                        ap_log_error(APLOG_MARK, APLOG_ERR, 0,
+                                     ap_server_conf,
+                                     "server is within MinSpareThreads of 
MaxClients, "
+                                     "consider raising the MaxClients 
setting");
+                    }
                 }
             }
             else {

Reply via email to