httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1847286 - in /httpd/httpd/branches/2.4.x: CHANGES STATUS server/mpm/event/event.c
Date Fri, 23 Nov 2018 15:25:36 GMT
Author: minfrin
Date: Fri Nov 23 15:25:35 2018
New Revision: 1847286

URL: http://svn.apache.org/viewvc?rev=1847286&view=rev
Log:
*) event MPM: Don't log "at MaxRequestWorkers" when there are still idle threads,
   just like worker.
+1: covener, jim, minfrin

Modified:
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/server/mpm/event/event.c

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1847286&r1=1847285&r2=1847286&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Fri Nov 23 15:25:35 2018
@@ -37,6 +37,11 @@ Changes with Apache 2.4.36
   *) mod_proxy_scgi, mod_proxy_uwsgi: improve error handling when sending the
      body of the response. [Jim Jagielski]
 
+  *) mpm_event: Stop issuing AH00484 "server reached MaxRequestWorkers..." when
+     there are still idle threads available. When there are less idle threads than
+     MinSpareThreads, issue new one-time message AH10159. Matches worker MPM.
+     [Eric Covener]
+
   *) mod_http2: adding defensive code for stream EOS handling, in case the request handler
      missed to signal it the normal way (eos buckets). Addresses github issues 
      https://github.com/icing/mod_h2/issues/164, https://github.com/icing/mod_h2/issues/167

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1847286&r1=1847285&r2=1847286&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Fri Nov 23 15:25:35 2018
@@ -126,12 +126,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   *) event MPM: Don't log "at MaxRequestWorkers" when there are still idle threads,
-      just like worker.
-      trunk: //svn.apache.org/r1843513
-      2.4.x patch: http://people.apache.org/~covener/patches/2.4.x-event-maxclients.diff
-      +1: covener, jim, minfrin
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.4.x/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/mpm/event/event.c?rev=1847286&r1=1847285&r2=1847286&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/mpm/event/event.c (original)
+++ httpd/httpd/branches/2.4.x/server/mpm/event/event.c Fri Nov 23 15:25:35 2018
@@ -372,6 +372,7 @@ typedef struct event_retained_data {
     int first_thread_limit;
     int sick_child_detected;
     int maxclients_reported;
+    int near_maxclients_reported;
     /*
      * The max child slot ever assigned, preserved across restarts.  Necessary
      * to deal with MaxRequestWorkers changes across AP_SIG_GRACEFUL restarts.
@@ -2833,13 +2834,23 @@ static void perform_idle_server_maintena
     }
     else if (idle_thread_count < min_spare_threads / num_buckets) {
         if (active_thread_count >= max_workers) {
-            if (!retained->maxclients_reported) {
-                /* only report this condition once */
-                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00484)
-                             "server reached MaxRequestWorkers setting, "
-                             "consider raising the MaxRequestWorkers "
-                             "setting");
-                retained->maxclients_reported = 1;
+            if (0 == idle_thread_count) { 
+                if (!retained->maxclients_reported) {
+                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00484)
+                                 "server reached MaxRequestWorkers setting, "
+                                 "consider raising the MaxRequestWorkers "
+                                 "setting");
+                    retained->maxclients_reported = 1;
+                }
+             }
+             else { 
+                if (!retained->near_maxclients_reported) {
+                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(10159)
+                            "server is within MinSpareThreads of "
+                            "MaxRequestWorkers, consider raising the "
+                            "MaxRequestWorkers setting");
+                    retained->near_maxclients_reported = 1;
+                }
             }
             retained->idle_spawn_rate[child_bucket] = 1;
         }



Mime
View raw message