httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poir...@apache.org
Subject svn commit: r906535 - in /httpd/httpd/trunk: CHANGES server/mpm/worker/worker.c
Date Thu, 04 Feb 2010 16:00:52 GMT
Author: poirier
Date: Thu Feb  4 16:00:51 2010
New Revision: 906535

URL: http://svn.apache.org/viewvc?rev=906535&view=rev
Log:
worker: don't report server has reached MaxClients until it does.
Add warning when within MinSpareThreads.

PR: 46996

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/server/mpm/worker/worker.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=906535&r1=906534&r2=906535&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Feb  4 16:00:51 2010
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.3.6
 
+  *) worker: Don't report server has reached MaxClients until it has.
+     Add message when server gets within MinSpareThreads of MaxClients.
+     PR 46996.  [Dan Poirier]
+
   *) mod_session: Session expiry was being initialised, but not updated
      on each session save, resulting in timed out sessions when there
      should not have been. Fixed. [Graham Leggett]

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=906535&r1=906534&r2=906535&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Thu Feb  4 16:00:51 2010
@@ -1547,14 +1547,27 @@
         if (free_length == 0) { /* scoreboard is full, can't fork */
 
             if (active_thread_count >= ap_daemons_limit * 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;
+                /* no threads are "inactive" - starting, stopping, etc. */
+                /* have we reached MaxClients, or just getting close? */
+                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");
+                        reported = 1;
+                    }
                 }
             }
             else {



Mime
View raw message