httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1137744 - in /httpd/httpd/trunk: ./ docs/conf/extra/ docs/manual/ docs/manual/misc/ docs/manual/mod/ modules/generators/ server/mpm/event/ server/mpm/mpmt_os2/ server/mpm/netware/ server/mpm/prefork/ server/mpm/worker/
Date Mon, 20 Jun 2011 19:00:53 GMT
Author: sf
Date: Mon Jun 20 19:00:52 2011
New Revision: 1137744

URL: http://svn.apache.org/viewvc?rev=1137744&view=rev
Log:
Rename MaxClients to MaxRequestWorkers which describes more accurately what
it does.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in
    httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml
    httpd/httpd/trunk/docs/manual/misc/security_tips.xml
    httpd/httpd/trunk/docs/manual/mod/event.xml
    httpd/httpd/trunk/docs/manual/mod/mpm_common.xml
    httpd/httpd/trunk/docs/manual/mod/prefork.xml
    httpd/httpd/trunk/docs/manual/mod/worker.xml
    httpd/httpd/trunk/docs/manual/upgrading.xml
    httpd/httpd/trunk/modules/generators/mod_status.c
    httpd/httpd/trunk/server/mpm/event/event.c
    httpd/httpd/trunk/server/mpm/mpmt_os2/mpmt_os2.c
    httpd/httpd/trunk/server/mpm/netware/mpm_netware.c
    httpd/httpd/trunk/server/mpm/prefork/prefork.c
    httpd/httpd/trunk/server/mpm/worker/worker.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Jun 20 19:00:52 2011
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.13
 
+  *) prefork, worker, event: Rename MaxClients to MaxRequestWorkers which
+     describes more accurately what it does. [Stefan Fritsch]
+
   *) rotatelogs: Add -p argument to specify custom program to invoke
      after a log rotation.  PR 51285. [<sveniu ifi.uio.no>, Joe Orton]
 

Modified: httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in (original)
+++ httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in Mon Jun 20 19:00:52 2011
@@ -30,48 +30,48 @@
 # StartServers: number of server processes to start
 # MinSpareServers: minimum number of server processes which are kept spare
 # MaxSpareServers: maximum number of server processes which are kept spare
-# MaxClients: maximum number of server processes allowed to start
+# MaxRequestWorkers: maximum number of server processes allowed to start
 # MaxConnectionsPerChild: maximum number of connections a server process serves
 #                         before terminating
 <IfModule mpm_prefork_module>
     StartServers             5
     MinSpareServers          5
     MaxSpareServers         10
-    MaxClients             150
+    MaxRequestWorkers      150
     MaxConnectionsPerChild   0
 </IfModule>
 
 # worker MPM
 # StartServers: initial number of server processes to start
-# MaxClients: maximum number of simultaneous client connections
 # MinSpareThreads: minimum number of worker threads which are kept spare
 # MaxSpareThreads: maximum number of worker threads which are kept spare
 # ThreadsPerChild: constant number of worker threads in each server process
+# MaxRequestWorkers: maximum number of worker threads
 # MaxConnectionsPerChild: maximum number of connections a server process serves
 #                         before terminating
 <IfModule mpm_worker_module>
     StartServers             2
-    MaxClients             150
     MinSpareThreads         25
     MaxSpareThreads         75 
     ThreadsPerChild         25
+    MaxRequestWorkers      150
     MaxConnectionsPerChild   0
 </IfModule>
 
 # event MPM
 # StartServers: initial number of server processes to start
-# MaxClients: maximum number of simultaneous client connections
 # MinSpareThreads: minimum number of worker threads which are kept spare
 # MaxSpareThreads: maximum number of worker threads which are kept spare
 # ThreadsPerChild: constant number of worker threads in each server process
+# MaxRequestWorkers: maximum number of worker threads
 # MaxConnectionsPerChild: maximum number of connections a server process serves
 #                         before terminating
 <IfModule mpm_event_module>
     StartServers             2
-    MaxClients             150
     MinSpareThreads         25
     MaxSpareThreads         75
     ThreadsPerChild         25
+    MaxRequestWorkers      150
     MaxConnectionsPerChild   0
 </IfModule>
 

Modified: httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml (original)
+++ httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml Mon Jun 20 19:00:52 2011
@@ -56,7 +56,7 @@
     that users consider "fast enough". This causes users to hit
     stop and reload, further increasing the load. You can, and
     should, control the <directive module="mpm_common"
-    >MaxClients</directive> setting so that your server
+    >MaxRequestWorkers</directive> setting so that your server
     does not spawn so many children it starts swapping. This procedure
     for doing this is simple: determine the size of your average Apache
     process, by looking at your process list via a tool such as

Modified: httpd/httpd/trunk/docs/manual/misc/security_tips.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/misc/security_tips.xml?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/misc/security_tips.xml (original)
+++ httpd/httpd/trunk/docs/manual/misc/security_tips.xml Mon Jun 20 19:00:52 2011
@@ -105,7 +105,7 @@
       require reconfiguration of your kernel.</li>
 
       <li>Tune the <directive
-      module="mpm_common">MaxClients</directive> directive to allow
+      module="mpm_common">MaxRequestWorkers</directive> directive to allow
       the server to handle the maximum number of simultaneous
       connections without running out of resources.  See also the <a
       href="perf-tuning.html">performance tuning

Modified: httpd/httpd/trunk/docs/manual/mod/event.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/event.xml?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/event.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/event.xml Mon Jun 20 19:00:52 2011
@@ -106,7 +106,7 @@ of consuming threads only for connection
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>SendBufferSize</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxClients</name>
+<directivesynopsis location="mpm_common"><name>MaxRequestWorkers</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxMemFree</name>
 </directivesynopsis>

Modified: httpd/httpd/trunk/docs/manual/mod/mpm_common.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mpm_common.xml?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mpm_common.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mpm_common.xml Mon Jun 20 19:00:52 2011
@@ -280,10 +280,10 @@ including other causes.</a></seealso>
 </directivesynopsis>
 
 <directivesynopsis>
-<name>MaxClients</name>
+<name>MaxRequestWorkers</name>
 <description>Maximum number of connections that will be processed
 simultaneously</description>
-<syntax>MaxClients <var>number</var></syntax>
+<syntax>MaxRequestWorkers <var>number</var></syntax>
 <default>See usage for details</default>
 <contextlist><context>server config</context></contextlist>
 <modulelist><module>event</module><module>prefork</module>
@@ -291,30 +291,34 @@ simultaneously</description>
 </modulelist>
 
 <usage>
-    <p>The <directive>MaxClients</directive> directive sets the limit
+    <p>The <directive>MaxRequestWorkers</directive> directive sets the limit
     on the number of simultaneous requests that will be served.  Any
-    connection attempts over the <directive>MaxClients</directive>
+    connection attempts over the <directive>MaxRequestWorkers</directive>
     limit will normally be queued, up to a number based on the
     <directive module="mpm_common">ListenBacklog</directive>
     directive. Once a child process is freed at the end of a different
     request, the connection will then be serviced.</p>
 
     <p>For non-threaded servers (<em>i.e.</em>, <module>prefork</module>),
-    <directive>MaxClients</directive> translates into the maximum
+    <directive>MaxRequestWorkers</directive> translates into the maximum
     number of child processes that will be launched to serve requests.
     The default value is <code>256</code>; to increase it, you must also raise
     <directive module="mpm_common">ServerLimit</directive>.</p>
 
     <p>For threaded and hybrid servers (<em>e.g.</em> <module>event</module>
-    or <module>worker</module>) <directive>MaxClients</directive> restricts
+    or <module>worker</module>) <directive>MaxRequestWorkers</directive> restricts
     the total number of threads that will be available to serve clients.
     For hybrid MPMs the default value is <code>16</code> (<directive
     module="mpm_common">ServerLimit</directive>) multiplied by the value of
     <code>25</code> (<directive module="mpm_common"
     >ThreadsPerChild</directive>). Therefore, to increase <directive
-    >MaxClients</directive> to a value that requires more than 16 processes,
+    >MaxRequestWorkers</directive> to a value that requires more than 16 processes,
     you must also raise <directive module="mpm_common"
     >ServerLimit</directive>.</p>
+
+    <p><directive>MaxRequestWorkers</directive> was called
+    <directive>MaxClients</directive> before version 2.3.13. The old name ist still
+    supported.</p>
 </usage>
 </directivesynopsis>
 
@@ -540,39 +544,39 @@ Apache HTTP Server</a></seealso>
 <usage>
     <p>For the <module>prefork</module> MPM, this directive sets the
     maximum configured value for <directive
-    module="mpm_common">MaxClients</directive> for the lifetime of the
+    module="mpm_common">MaxRequestWorkers</directive> for the lifetime of the
     Apache httpd process.  For the <module>worker</module> MPM, this directive
     in combination with <directive
     module="mpm_common">ThreadLimit</directive> sets
     the maximum configured value for <directive
-    module="mpm_common">MaxClients</directive> for the lifetime of the
+    module="mpm_common">MaxRequestWorkers</directive> for the lifetime of the
     Apache httpd process.  Any attempts to change this directive during a
     restart will be ignored, but <directive
-    module="mpm_common">MaxClients</directive> can be modified during
+    module="mpm_common">MaxRequestWorkers</directive> can be modified during
     a restart.</p>
 
     <p>Special care must be taken when using this directive.  If
     <directive>ServerLimit</directive> is set to a value much higher
     than necessary, extra, unused shared memory will be allocated.  If
     both <directive>ServerLimit</directive> and <directive
-    module="mpm_common">MaxClients</directive> are set to values
+    module="mpm_common">MaxRequestWorkers</directive> are set to values
     higher than the system can handle, Apache httpd may not start or the
     system may become unstable.</p>
 
     <p>With the <module>prefork</module> MPM, use this directive only
     if you need to set <directive
-    module="mpm_common">MaxClients</directive> higher than 256 (default).
+    module="mpm_common">MaxRequestWorkers</directive> higher than 256 (default).
     Do not set the value of this directive any higher than what you
     might want to set <directive
-    module="mpm_common">MaxClients</directive> to.</p>
+    module="mpm_common">MaxRequestWorkers</directive> to.</p>
 
     <p>With <module>worker</module>, use this directive only
-    if your <directive module="mpm_common">MaxClients</directive> and
+    if your <directive module="mpm_common">MaxRequestWorkers</directive> and
     <directive module="mpm_common">ThreadsPerChild</directive>
     settings require more than 16 server processes (default). Do not set
     the value of this directive any higher than the number of server
     processes required by what you may want for <directive
-    module="mpm_common">MaxClients </directive> and <directive
+    module="mpm_common">MaxRequestWorkers </directive> and <directive
     module="mpm_common">ThreadsPerChild</directive>.</p>
 
     <note><title>Note</title>

Modified: httpd/httpd/trunk/docs/manual/mod/prefork.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/prefork.xml?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/prefork.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/prefork.xml Mon Jun 20 19:00:52 2011
@@ -39,8 +39,8 @@
 
     <p>This MPM is very self-regulating, so it is rarely necessary to
     adjust its configuration directives.  Most important is that
-    <directive module="mpm_common">MaxClients</directive> be big enough to 
-    handle as many simultaneous requests as you expect to receive, but
+    <directive module="mpm_common">MaxRequestWorkers</directive> be big enough
+    to handle as many simultaneous requests as you expect to receive, but
     small enough to assure that there is enough physical RAM for all
     processes.</p>
 </summary>
@@ -59,14 +59,14 @@ uses</a></seealso>
     <p>The <directive module="mpm_common">StartServers</directive>,
     <directive module="prefork">MinSpareServers</directive>,
     <directive module="prefork">MaxSpareServers</directive>, and
-    <directive module="mpm_common">MaxClients</directive> regulate how
+    <directive module="mpm_common">MaxRequestWorkers</directive> regulate how
     the parent process creates children to serve requests. In general,
     Apache httpd is very self-regulating, so most sites do not need to
     adjust these directives from their default values. Sites which
     need to serve more than 256 simultaneous requests may need to
-    increase <directive module="mpm_common">MaxClients</directive>,
+    increase <directive module="mpm_common">MaxRequestWorkers</directive>,
     while sites with limited memory may need to decrease <directive
-    module="mpm_common">MaxClients</directive> to keep the server from
+    module="mpm_common">MaxRequestWorkers</directive> to keep the server from
     thrashing (swapping memory to disk and back). More information
     about tuning process creation is provided in the <a
     href="../misc/perf-tuning.html">performance hints</a>
@@ -104,7 +104,7 @@ uses</a></seealso>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>ListenBacklog</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxClients</name>
+<directivesynopsis location="mpm_common"><name>MaxRequestWorkers</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxMemFree</name>
 </directivesynopsis>

Modified: httpd/httpd/trunk/docs/manual/mod/worker.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/worker.xml?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/worker.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/worker.xml Mon Jun 20 19:00:52 2011
@@ -39,7 +39,7 @@
     <p>The most important directives used to control this MPM are
     <directive module="mpm_common">ThreadsPerChild</directive>, which
     controls the number of threads deployed by each child process and
-    <directive module="mpm_common">MaxClients</directive>, which
+    <directive module="mpm_common">MaxRequestWorkers</directive>, which
     controls the maximum total number of threads that may be
     launched.</p>
 </summary>
@@ -68,9 +68,9 @@
     these directives from their default values. The maximum number of
     clients that may be served simultaneously (i.e., the maximum total
     number of threads in all processes) is determined by the
-    <directive module="mpm_common">MaxClients</directive> directive.
+    <directive module="mpm_common">MaxRequestWorkers</directive> directive.
     The maximum number of active child processes is determined by
-    the <directive module="mpm_common">MaxClients</directive>
+    the <directive module="mpm_common">MaxRequestWorkers</directive>
     directive divided by the <directive module="mpm_common">
     ThreadsPerChild</directive> directive.</p>
 
@@ -80,7 +80,7 @@
     starting it again.  <directive module="mpm_common">ServerLimit
     </directive> is a hard limit on the number of active child 
     processes, and must be greater than or equal to the 
-    <directive module="mpm_common">MaxClients</directive>
+    <directive module="mpm_common">MaxRequestWorkers</directive>
     directive divided by the <directive module="mpm_common">
     ThreadsPerChild</directive> directive.  
     <directive module="mpm_common">ThreadLimit</directive> is a hard
@@ -92,7 +92,7 @@
     be additional child processes which are terminating, but where at
     least one server thread is still handling an existing client
     connection.  Up to <directive 
-    module="mpm_common">MaxClients</directive> terminating processes 
+    module="mpm_common">MaxRequestWorkers</directive> terminating processes 
     may be present, though the actual number can be expected to be 
     much smaller.  This behavior can be avoided by disabling the 
     termination of individual child processes, which is achieved using
@@ -104,7 +104,7 @@
 
       <li>set the value of <directive module="mpm_common">
       MaxSpareThreads</directive> to the same value as
-      <directive module="mpm_common">MaxClients</directive></li>
+      <directive module="mpm_common">MaxRequestWorkers</directive></li>
     </ul>
 
     <p>A typical configuration of the process-thread controls in
@@ -113,7 +113,7 @@
     <example>
       ServerLimit         16<br />
       StartServers         2<br />
-      MaxClients         150<br />
+      MaxRequestWorkers         150<br />
       MinSpareThreads     25<br />
       MaxSpareThreads     75<br />
       ThreadsPerChild     25
@@ -156,7 +156,7 @@
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>ListenBacklog</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxClients</name>
+<directivesynopsis location="mpm_common"><name>MaxRequestWorkers</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxMemFree</name>
 </directivesynopsis>

Modified: httpd/httpd/trunk/docs/manual/upgrading.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/upgrading.xml?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/upgrading.xml (original)
+++ httpd/httpd/trunk/docs/manual/upgrading.xml Mon Jun 20 19:00:52 2011
@@ -168,7 +168,15 @@
       <ul>
         <li><directive>MaxRequestsPerChild</directive> has been renamed to
         <directive module="mpm_common">MaxConnectionsPerChild</directive>,
-        which describes more accurately what it does.</li>
+        describes more accurately what it does. The old name is still
+        supported.</li>
+
+        <li><directive>MaxClients</directive> has been renamed to
+        <directive module="mpm_common">MaxRequestWorkers</directive>,
+        which describes more accurately what it does. For async MPMs, like
+        <module>event</module>, the maximum number of clients is not
+        equivalent than the number of worker threads. The old name is still
+        supported.</li>
 
         <li>The <directive module="core">DefaultType</directive>
         directive no longer has any effect, other than to emit a

Modified: httpd/httpd/trunk/modules/generators/mod_status.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_status.c?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_status.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_status.c Mon Jun 20 19:00:52 2011
@@ -173,7 +173,7 @@ static const struct stat_opt status_opti
     {STAT_OPT_END, NULL, NULL}
 };
 
-/* add another state for slots above the MaxClients setting */
+/* add another state for slots above the MaxRequestWorkers setting */
 #define SERVER_DISABLED SERVER_NUM_STATUS
 #define MOD_STATUS_NUM_STATUS (SERVER_NUM_STATUS+1)
 

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Mon Jun 20 19:00:52 2011
@@ -162,7 +162,7 @@ static int ap_daemons_to_start = 0;
 static int min_spare_threads = 0;
 static int max_spare_threads = 0;
 static int ap_daemons_limit = 0;
-static int max_clients = 0;
+static int max_workers = 0;
 static int server_limit = 0;
 static int thread_limit = 0;
 static int dying = 0;
@@ -271,8 +271,8 @@ typedef struct event_retained_data {
     int maxclients_reported;
     /*
      * The max child slot ever assigned, preserved across restarts.  Necessary
-     * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts.  We
-     * use this value to optimize routines that have to scan the entire
+     * to deal with MaxRequestWorkers changes across AP_SIG_GRACEFUL restarts.
+     * We use this value to optimize routines that have to scan the entire
      * scoreboard.
      */
     int max_daemons_limit;
@@ -2370,17 +2370,16 @@ static void perform_idle_server_maintena
             if (active_thread_count >= ap_daemons_limit * threads_per_child) {
                 if (!retained->maxclients_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");
+                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
+                                 "server reached MaxRequestWorkers setting, "
+                                 "consider raising the MaxRequestWorkers "
+                                 "setting");
                     retained->maxclients_reported = 1;
                 }
             }
             else {
-                ap_log_error(APLOG_MARK, APLOG_ERR, 0,
-                             ap_server_conf,
-                             "scoreboard is full, not at MaxClients");
+                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
+                             "scoreboard is full, not at MaxRequestWorkers");
             }
             retained->idle_spawn_rate = 1;
         }
@@ -2389,8 +2388,7 @@ static void perform_idle_server_maintena
                 free_length = retained->idle_spawn_rate;
             }
             if (retained->idle_spawn_rate >= 8) {
-                ap_log_error(APLOG_MARK, APLOG_INFO, 0,
-                             ap_server_conf,
+                ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
                              "server seems busy, (you may need "
                              "to increase StartServers, ThreadsPerChild "
                              "or Min/MaxSpareThreads), "
@@ -2781,7 +2779,7 @@ static int event_pre_config(apr_pool_t *
     thread_limit = DEFAULT_THREAD_LIMIT;
     ap_daemons_limit = server_limit;
     threads_per_child = DEFAULT_THREADS_PER_CHILD;
-    max_clients = ap_daemons_limit * threads_per_child;
+    max_workers = ap_daemons_limit * threads_per_child;
     ap_extended_status = 0;
 
     return OK;
@@ -2917,57 +2915,57 @@ static int event_check_config(apr_pool_t
         threads_per_child = 1;
     }
 
-    if (max_clients < threads_per_child) {
+    if (max_workers < threads_per_child) {
         if (startup) {
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         "WARNING: MaxClients of %d is less than "
-                         "ThreadsPerChild of", max_clients);
+                         "WARNING: MaxRequestWorkers of %d is less than "
+                         "ThreadsPerChild of", max_workers);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         " %d, increasing to %d.  MaxClients must be at "
+                         " %d, increasing to %d.  MaxRequestWorkers must be at "
                          "least as large",
                          threads_per_child, threads_per_child);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " as the number of threads in a single server.");
         } else {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "MaxClients of %d is less than ThreadsPerChild "
+                         "MaxRequestWorkers of %d is less than ThreadsPerChild "
                          "of %d, increasing to match",
-                         max_clients, threads_per_child);
+                         max_workers, threads_per_child);
         }
-        max_clients = threads_per_child;
+        max_workers = threads_per_child;
     }
 
-    ap_daemons_limit = max_clients / threads_per_child;
+    ap_daemons_limit = max_workers / threads_per_child;
 
-    if (max_clients % threads_per_child) {
-        int tmp_max_clients = ap_daemons_limit * threads_per_child;
+    if (max_workers % threads_per_child) {
+        int tmp_max_workers = ap_daemons_limit * threads_per_child;
 
         if (startup) {
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         "WARNING: MaxClients of %d is not an integer "
-                         "multiple of", max_clients);
+                         "WARNING: MaxRequestWorkers of %d is not an integer "
+                         "multiple of", max_workers);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " ThreadsPerChild of %d, decreasing to nearest "
                          "multiple %d,", threads_per_child,
-                         tmp_max_clients);
+                         tmp_max_workers);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " for a maximum of %d servers.",
                          ap_daemons_limit);
         } else {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "MaxClients of %d is not an integer multiple of "
-                         "ThreadsPerChild of %d, decreasing to nearest "
-                         "multiple %d", max_clients, threads_per_child,
-                         tmp_max_clients);
+                         "MaxRequestWorkers of %d is not an integer multiple "
+                         "of ThreadsPerChild of %d, decreasing to nearest "
+                         "multiple %d", max_workers, threads_per_child,
+                         tmp_max_workers);
         }
-        max_clients = tmp_max_clients;
+        max_workers = tmp_max_workers;
     }
 
     if (ap_daemons_limit > server_limit) {
         if (startup) {
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         "WARNING: MaxClients of %d would require %d "
-                         "servers and ", max_clients, ap_daemons_limit);
+                         "WARNING: MaxRequestWorkers of %d would require %d "
+                         "servers and ", max_workers, ap_daemons_limit);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " would exceed ServerLimit of %d, decreasing to %d.",
                          server_limit, server_limit * threads_per_child);
@@ -2976,9 +2974,9 @@ static int event_check_config(apr_pool_t
                          "directive.");
         } else {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "MaxClients of %d would require %d servers and "
+                         "MaxRequestWorkers of %d would require %d servers and "
                          "exceed ServerLimit of %d, decreasing to %d",
-                         max_clients, ap_daemons_limit, server_limit,
+                         max_workers, ap_daemons_limit, server_limit,
                          server_limit * threads_per_child);
         }
         ap_daemons_limit = server_limit;
@@ -3080,15 +3078,19 @@ static const char *set_max_spare_threads
     return NULL;
 }
 
-static const char *set_max_clients(cmd_parms * cmd, void *dummy,
+static const char *set_max_workers(cmd_parms * cmd, void *dummy,
                                    const char *arg)
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
         return err;
     }
-
-    max_clients = atoi(arg);
+    if (!strcasecmp(cmd->cmd->name, "MaxRequestWorkers")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
+                     "MaxClients is deprecated, use MaxRequestWorkers "
+                     "instead.");
+    }
+    max_workers = atoi(arg);
     return NULL;
 }
 
@@ -3136,7 +3138,9 @@ static const command_rec event_cmds[] = 
                   "Minimum number of idle threads, to handle request spikes"),
     AP_INIT_TAKE1("MaxSpareThreads", set_max_spare_threads, NULL, RSRC_CONF,
                   "Maximum number of idle threads"),
-    AP_INIT_TAKE1("MaxClients", set_max_clients, NULL, RSRC_CONF,
+    AP_INIT_TAKE1("MaxClients", set_max_workers, NULL, RSRC_CONF,
+                  "Deprecated name of MaxRequestWorkers"),
+    AP_INIT_TAKE1("MaxRequestWorkers", set_max_workers, NULL, RSRC_CONF,
                   "Maximum number of threads alive at the same time"),
     AP_INIT_TAKE1("ThreadsPerChild", set_threads_per_child, NULL, RSRC_CONF,
                   "Number of threads each child creates"),

Modified: httpd/httpd/trunk/server/mpm/mpmt_os2/mpmt_os2.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/mpmt_os2/mpmt_os2.c?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/mpmt_os2/mpmt_os2.c (original)
+++ httpd/httpd/trunk/server/mpm/mpmt_os2/mpmt_os2.c Mon Jun 20 19:00:52 2011
@@ -34,7 +34,7 @@
 
 /*
  Todo list
- - Enforce MaxClients somehow
+ - Enforce MaxRequestWorkers somehow
 */
 #define INCL_NOPMAPI
 #define INCL_DOS

Modified: httpd/httpd/trunk/server/mpm/netware/mpm_netware.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/netware/mpm_netware.c?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/netware/mpm_netware.c (original)
+++ httpd/httpd/trunk/server/mpm/netware/mpm_netware.c Mon Jun 20 19:00:52 2011
@@ -121,7 +121,7 @@ static int mpm_state = AP_MPMQ_STARTING;
 
 /*
  * The max child slot ever assigned, preserved across restarts.  Necessary
- * to deal with MaxClients changes across SIGWINCH restarts.  We use this
+ * to deal with MaxRequestWorkers changes across SIGWINCH restarts.  We use this
  * value to optimize routines that have to scan the entire scoreboard.
  */
 static int ap_max_workers_limit = -1;
@@ -681,8 +681,8 @@ static void perform_idle_server_maintena
 
             if (!reported) {
                 ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
-                    "server reached MaxClients setting, consider"
-                    " raising the MaxClients setting");
+                    "server reached MaxRequestWorkers setting, consider"
+                    " raising the MaxRequestWorkers setting");
                 reported = 1;
             }
             idle_spawn_rate = 1;

Modified: httpd/httpd/trunk/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/prefork.c?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/trunk/server/mpm/prefork/prefork.c Mon Jun 20 19:00:52 2011
@@ -90,7 +90,7 @@ static apr_proc_mutex_t *accept_mutex;
 static int ap_daemons_to_start=0;
 static int ap_daemons_min_free=0;
 static int ap_daemons_max_free=0;
-static int ap_daemons_limit=0;      /* MaxClients */
+static int ap_daemons_limit=0;      /* MaxRequestWorkers */
 static int server_limit = 0;
 static int mpm_state = AP_MPMQ_STARTING;
 static ap_pod_t *pod;
@@ -107,7 +107,7 @@ typedef struct prefork_retained_data {
     int maxclients_reported;
     /*
      * The max child slot ever assigned, preserved across restarts.  Necessary
-     * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts.  We
+     * to deal with MaxRequestWorkers changes across AP_SIG_GRACEFUL restarts.  We
      * use this value to optimize routines that have to scan the entire scoreboard.
      */
     int max_daemons_limit;
@@ -876,8 +876,8 @@ static void perform_idle_server_maintena
             /* only report this condition once */
             if (!retained->maxclients_reported) {
                 ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
-                            "server reached MaxClients setting, consider"
-                            " raising the MaxClients setting");
+                            "server reached MaxRequestWorkers setting, consider"
+                            " raising the MaxRequestWorkers setting");
                 retained->maxclients_reported = 1;
             }
             retained->idle_spawn_rate = 1;
@@ -1355,17 +1355,17 @@ static int prefork_check_config(apr_pool
     if (ap_daemons_limit > server_limit) {
         if (startup) {
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         "WARNING: MaxClients of %d exceeds ServerLimit "
+                         "WARNING: MaxRequestWorkers of %d exceeds ServerLimit "
                          "value of", ap_daemons_limit);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         " %d servers, decreasing MaxClients to %d.",
+                         " %d servers, decreasing MaxRequestWorkers to %d.",
                          server_limit, server_limit);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " To increase, please see the ServerLimit "
                          "directive.");
         } else {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "MaxClients of %d exceeds ServerLimit value "
+                         "MaxRequestWorkers of %d exceeds ServerLimit value "
                          "of %d, decreasing to match",
                          ap_daemons_limit, server_limit);
         }
@@ -1374,11 +1374,11 @@ static int prefork_check_config(apr_pool
     else if (ap_daemons_limit < 1) {
         if (startup) {
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         "WARNING: MaxClients of %d not allowed, "
+                         "WARNING: MaxRequestWorkers of %d not allowed, "
                          "increasing to 1.", ap_daemons_limit);
         } else {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "MaxClients of %d not allowed, increasing to 1",
+                         "MaxRequestWorkers of %d not allowed, increasing to 1",
                          ap_daemons_limit);
         }
         ap_daemons_limit = 1;
@@ -1478,7 +1478,11 @@ static const char *set_max_clients (cmd_
     if (err != NULL) {
         return err;
     }
-
+    if (!strcasecmp(cmd->cmd->name, "MaxRequestWorkers")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
+                     "MaxClients is deprecated, use MaxRequestWorkers "
+                     "instead.");
+    }
     ap_daemons_limit = atoi(arg);
     return NULL;
 }
@@ -1503,9 +1507,11 @@ AP_INIT_TAKE1("MinSpareServers", set_min
 AP_INIT_TAKE1("MaxSpareServers", set_max_free_servers, NULL, RSRC_CONF,
               "Maximum number of idle children"),
 AP_INIT_TAKE1("MaxClients", set_max_clients, NULL, RSRC_CONF,
+              "Deprecated name of MaxRequestWorkers"),
+AP_INIT_TAKE1("MaxRequestWorkers", set_max_clients, NULL, RSRC_CONF,
               "Maximum number of children alive at the same time"),
 AP_INIT_TAKE1("ServerLimit", set_server_limit, NULL, RSRC_CONF,
-              "Maximum value of MaxClients for this run of Apache"),
+              "Maximum value of MaxRequestWorkers for this run of Apache"),
 AP_GRACEFUL_SHUTDOWN_TIMEOUT_COMMAND,
 { NULL }
 };

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=1137744&r1=1137743&r2=1137744&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Mon Jun 20 19:00:52 2011
@@ -119,7 +119,7 @@ static int ap_daemons_to_start = 0;
 static int min_spare_threads = 0;
 static int max_spare_threads = 0;
 static int ap_daemons_limit = 0;
-static int max_clients = 0;
+static int max_workers = 0;
 static int server_limit = 0;
 static int thread_limit = 0;
 static int dying = 0;
@@ -148,8 +148,8 @@ typedef struct worker_retained_data {
     int near_maxclients_reported;
     /*
      * The max child slot ever assigned, preserved across restarts.  Necessary
-     * to deal with MaxClients changes across AP_SIG_GRACEFUL restarts.  We
-     * use this value to optimize routines that have to scan the entire
+     * to deal with MaxRequestWorkers changes across AP_SIG_GRACEFUL restarts.
+     * We use this value to optimize routines that have to scan the entire
      * scoreboard.
      */
     int max_daemons_limit;
@@ -1584,22 +1584,22 @@ static void perform_idle_server_maintena
 
             if (active_thread_count >= ap_daemons_limit * threads_per_child) { 
                 /* no threads are "inactive" - starting, stopping, etc. */
-                /* have we reached MaxClients, or just getting close? */
+                /* have we reached MaxRequestWorkers, or just getting close? */
                 if (0 == idle_thread_count) {
                     if (!retained->maxclients_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");
+                        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
+                                     "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,
-                                     "server is within MinSpareThreads of MaxClients, "
-                                     "consider raising the MaxClients setting");
+                        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
+                                     "server is within MinSpareThreads of "
+                                     "MaxRequestWorkers, consider raising the "
+                                     "MaxRequestWorkers setting");
                         retained->near_maxclients_reported = 1;
                     }
                 }
@@ -1607,7 +1607,7 @@ static void perform_idle_server_maintena
             else {
                 ap_log_error(APLOG_MARK, APLOG_ERR, 0,
                              ap_server_conf,
-                             "scoreboard is full, not at MaxClients");
+                             "scoreboard is full, not at MaxRequestWorkers");
             }
             retained->idle_spawn_rate = 1;
         }
@@ -2007,7 +2007,7 @@ static int worker_pre_config(apr_pool_t 
     thread_limit = DEFAULT_THREAD_LIMIT;
     ap_daemons_limit = server_limit;
     threads_per_child = DEFAULT_THREADS_PER_CHILD;
-    max_clients = ap_daemons_limit * threads_per_child;
+    max_workers = ap_daemons_limit * threads_per_child;
     ap_extended_status = 0;
 
     return OK;
@@ -2143,57 +2143,57 @@ static int worker_check_config(apr_pool_
         threads_per_child = 1;
     }
 
-    if (max_clients < threads_per_child) {
+    if (max_workers < threads_per_child) {
         if (startup) {
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         "WARNING: MaxClients of %d is less than "
-                         "ThreadsPerChild of", max_clients);
+                         "WARNING: MaxRequestWorkers of %d is less than "
+                         "ThreadsPerChild of", max_workers);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         " %d, increasing to %d.  MaxClients must be at "
+                         " %d, increasing to %d.  MaxRequestWorkers must be at "
                          "least as large",
                          threads_per_child, threads_per_child);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " as the number of threads in a single server.");
         } else {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "MaxClients of %d is less than ThreadsPerChild "
+                         "MaxRequestWorkers of %d is less than ThreadsPerChild "
                          "of %d, increasing to match",
-                         max_clients, threads_per_child);
+                         max_workers, threads_per_child);
         }
-        max_clients = threads_per_child;
+        max_workers = threads_per_child;
     }
 
-    ap_daemons_limit = max_clients / threads_per_child;
+    ap_daemons_limit = max_workers / threads_per_child;
 
-    if (max_clients % threads_per_child) {
-        int tmp_max_clients = ap_daemons_limit * threads_per_child;
+    if (max_workers % threads_per_child) {
+        int tmp_max_workers = ap_daemons_limit * threads_per_child;
 
         if (startup) {
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         "WARNING: MaxClients of %d is not an integer "
-                         "multiple of", max_clients);
+                         "WARNING: MaxRequestWorkers of %d is not an integer "
+                         "multiple of", max_workers);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " ThreadsPerChild of %d, decreasing to nearest "
                          "multiple %d,", threads_per_child,
-                         tmp_max_clients);
+                         tmp_max_workers);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " for a maximum of %d servers.",
                          ap_daemons_limit);
         } else {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "MaxClients of %d is not an integer multiple of "
+                         "MaxRequestWorkers of %d is not an integer multiple of "
                          "ThreadsPerChild of %d, decreasing to nearest "
-                         "multiple %d", max_clients, threads_per_child,
-                         tmp_max_clients);
+                         "multiple %d", max_workers, threads_per_child,
+                         tmp_max_workers);
         }
-        max_clients = tmp_max_clients;
+        max_workers = tmp_max_workers;
     }
 
     if (ap_daemons_limit > server_limit) {
         if (startup) {
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
-                         "WARNING: MaxClients of %d would require %d "
-                         "servers and ", max_clients, ap_daemons_limit);
+                         "WARNING: MaxRequestWorkers of %d would require %d "
+                         "servers and ", max_workers, ap_daemons_limit);
             ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
                          " would exceed ServerLimit of %d, decreasing to %d.",
                          server_limit, server_limit * threads_per_child);
@@ -2202,9 +2202,9 @@ static int worker_check_config(apr_pool_
                          "directive.");
         } else {
             ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "MaxClients of %d would require %d servers and "
+                         "MaxRequestWorkers of %d would require %d servers and "
                          "exceed ServerLimit of %d, decreasing to %d",
-                         max_clients, ap_daemons_limit, server_limit,
+                         max_workers, ap_daemons_limit, server_limit,
                          server_limit * threads_per_child);
         }
         ap_daemons_limit = server_limit;
@@ -2304,15 +2304,19 @@ static const char *set_max_spare_threads
     return NULL;
 }
 
-static const char *set_max_clients (cmd_parms *cmd, void *dummy,
+static const char *set_max_workers (cmd_parms *cmd, void *dummy,
                                      const char *arg)
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
         return err;
     }
-
-    max_clients = atoi(arg);
+    if (!strcasecmp(cmd->cmd->name, "MaxRequestWorkers")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
+                     "MaxClients is deprecated, use MaxRequestWorkers "
+                     "instead.");
+    }
+    max_workers = atoi(arg);
     return NULL;
 }
 
@@ -2358,8 +2362,10 @@ AP_INIT_TAKE1("MinSpareThreads", set_min
   "Minimum number of idle threads, to handle request spikes"),
 AP_INIT_TAKE1("MaxSpareThreads", set_max_spare_threads, NULL, RSRC_CONF,
   "Maximum number of idle threads"),
-AP_INIT_TAKE1("MaxClients", set_max_clients, NULL, RSRC_CONF,
+AP_INIT_TAKE1("MaxRequestWorkers", set_max_workers, NULL, RSRC_CONF,
   "Maximum number of threads alive at the same time"),
+AP_INIT_TAKE1("MaxClients", set_max_workers, NULL, RSRC_CONF,
+  "Deprecated name of MaxRequestWorkers"),
 AP_INIT_TAKE1("ThreadsPerChild", set_threads_per_child, NULL, RSRC_CONF,
   "Number of threads each child creates"),
 AP_INIT_TAKE1("ServerLimit", set_server_limit, NULL, RSRC_CONF,



Mime
View raw message