httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1021924 - in /httpd/httpd/trunk: ./ docs/conf/extra/ docs/manual/ docs/manual/misc/ docs/manual/mod/ docs/manual/platform/ server/ server/mpm/event/ server/mpm/winnt/ server/mpm/worker/
Date Tue, 12 Oct 2010 21:12:38 GMT
Author: sf
Date: Tue Oct 12 21:12:37 2010
New Revision: 1021924

URL: http://svn.apache.org/viewvc?rev=1021924&view=rev
Log:
Rename MaxRequestsPerChild to MaxConnectionsPerChild, which
describes more accurately what the directive does.

The old name still works but logs a warning.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/STATUS
    httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in
    httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml
    httpd/httpd/trunk/docs/manual/mod/core.xml
    httpd/httpd/trunk/docs/manual/mod/event.xml
    httpd/httpd/trunk/docs/manual/mod/mpm_common.xml
    httpd/httpd/trunk/docs/manual/mod/mpm_netware.xml
    httpd/httpd/trunk/docs/manual/mod/mpm_winnt.xml
    httpd/httpd/trunk/docs/manual/mod/mpmt_os2.xml
    httpd/httpd/trunk/docs/manual/mod/prefork.xml
    httpd/httpd/trunk/docs/manual/mod/worker.xml
    httpd/httpd/trunk/docs/manual/platform/netware.xml
    httpd/httpd/trunk/docs/manual/platform/windows.xml
    httpd/httpd/trunk/docs/manual/upgrading.xml
    httpd/httpd/trunk/server/core.c
    httpd/httpd/trunk/server/mpm/event/event.c
    httpd/httpd/trunk/server/mpm/winnt/child.c
    httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
    httpd/httpd/trunk/server/mpm/worker/worker.c
    httpd/httpd/trunk/server/mpm_common.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Oct 12 21:12:37 2010
@@ -6,6 +6,10 @@ Changes with Apache 2.3.9
      Fix a denial of service attack against mod_reqtimeout.
      [Stefan Fritsch]
 
+  *) core: Rename MaxRequestsPerChild to MaxConnectionsPerChild, which
+     describes more accurately what the directive does. The old name
+     still works but logs a warning. [Stefan Fritsch]
+
   *) mod_cache: Optionally serve stale data when a revalidation returns a
      5xx response, controlled by the CacheStaleOnError directive.
      [Graham Leggett]

Modified: httpd/httpd/trunk/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/STATUS?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/STATUS (original)
+++ httpd/httpd/trunk/STATUS Tue Oct 12 21:12:37 2010
@@ -420,10 +420,6 @@ WISH LIST
     HTTP or SNMP?
     jerenkrantz says: Yawn.  Who cares.
 
-  * MaxRequestsPerChild measures connections, not requests.
-      Until someone has a better way, we'll probably just rename it
-      "MaxConnectionsPerChild".
-    
   * Regex containers don't work in an intutive way
       Status: No one has come up with an efficient way to fix this
       behavior. Dean has suggested getting rid of regex containers

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=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in (original)
+++ httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in Tue Oct 12 21:12:37 2010
@@ -31,13 +31,14 @@
 # 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
-# MaxRequestsPerChild: maximum number of requests a server process serves
+# MaxConnectionsPerChild: maximum number of connections a server process serves
+#                         before terminating
 <IfModule mpm_prefork_module>
-    StartServers          5
-    MinSpareServers       5
-    MaxSpareServers      10
-    MaxClients          150
-    MaxRequestsPerChild   0
+    StartServers             5
+    MinSpareServers          5
+    MaxSpareServers         10
+    MaxClients             150
+    MaxConnectionsPerChild   0
 </IfModule>
 
 # worker MPM
@@ -46,14 +47,15 @@
 # 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
-# MaxRequestsPerChild: maximum number of requests a server process serves
+# 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
-    MaxRequestsPerChild   0
+    StartServers             2
+    MaxClients             150
+    MinSpareThreads         25
+    MaxSpareThreads         75 
+    ThreadsPerChild         25
+    MaxConnectionsPerChild   0
 </IfModule>
 
 # event MPM
@@ -62,14 +64,15 @@
 # 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
-# MaxRequestsPerChild: maximum number of requests a server process serves
+# 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
-    MaxRequestsPerChild   0
+    StartServers             2
+    MaxClients             150
+    MinSpareThreads         25
+    MaxSpareThreads         75
+    ThreadsPerChild         25
+    MaxConnectionsPerChild   0
 </IfModule>
 
 # NetWare MPM
@@ -78,17 +81,17 @@
 # MinSpareThreads: Minimum number of idle threads, to handle request spikes
 # MaxSpareThreads: Maximum number of idle threads
 # MaxThreads: Maximum number of worker threads alive at the same time
-# MaxRequestsPerChild: Maximum  number of requests a thread serves. It is 
-#                      recommended that the default value of 0 be set for this
-#                      directive on NetWare.  This will allow the thread to 
-#                      continue to service requests indefinitely.                       
  
+# MaxConnectionsPerChild: Maximum  number of connections a thread serves. It
+#                         is recommended that the default value of 0 be set
+#                         for this directive on NetWare.  This will allow the
+#                         thread to continue to service requests indefinitely.
 <IfModule mpm_netware_module>
     ThreadStackSize      65536
     StartThreads           250
     MinSpareThreads         25
     MaxSpareThreads        250
     MaxThreads            1000
-    MaxRequestsPerChild      0
+    MaxConnectionsPerChild   0
     MaxMemFree             100
 </IfModule>
 
@@ -97,19 +100,19 @@
 # MinSpareThreads: Minimum number of idle threads per process, 
 #                  to handle request spikes
 # MaxSpareThreads: Maximum number of idle threads per process
-# MaxRequestsPerChild: Maximum number of connections per server process
+# MaxConnectionsPerChild: Maximum number of connections per server process
 <IfModule mpm_mpmt_os2_module>
-    StartServers           2
-    MinSpareThreads        5
-    MaxSpareThreads       10
-    MaxRequestsPerChild    0
+    StartServers             2
+    MinSpareThreads          5
+    MaxSpareThreads         10
+    MaxConnectionsPerChild   0
 </IfModule>
 
 # WinNT MPM
 # ThreadsPerChild: constant number of worker threads in the server process
-# MaxRequestsPerChild: maximum  number of requests a server process serves
+# MaxConnectionsPerChild: maximum number of connections a server process serves
 <IfModule mpm_winnt_module>
-    ThreadsPerChild      150
-    MaxRequestsPerChild    0
+    ThreadsPerChild        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=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml (original)
+++ httpd/httpd/trunk/docs/manual/misc/perf-tuning.xml Tue Oct 12 21:12:37 2010
@@ -398,9 +398,9 @@
       Use the <module>mod_status</module> output as a guide.</p>
 
     <p>Related to process creation is process death induced by the
-    <directive module="mpm_common">MaxRequestsPerChild</directive>
+    <directive module="mpm_common">MaxConnectionsPerChild</directive>
     setting. By default this is <code>0</code>,
-    which means that there is no limit to the number of requests
+    which means that there is no limit to the number of connections
     handled per child. If your configuration currently has this set
     to some very low number, such as <code>30</code>, you may want to bump this
     up significantly. If you are running SunOS or an old version of

Modified: httpd/httpd/trunk/docs/manual/mod/core.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/core.xml Tue Oct 12 21:12:37 2010
@@ -1792,7 +1792,7 @@ wildcard matching available in 2.3.6 and
 
     <p>When a client uses a Keep-Alive connection it will be counted
     as a single "request" for the <directive module="mpm_common"
-    >MaxRequestsPerChild</directive> directive, regardless
+    >MaxConnectionsPerChild</directive> directive, regardless
     of how many requests are sent using the connection.</p>
 </usage>
 

Modified: httpd/httpd/trunk/docs/manual/mod/event.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/event.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/event.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/event.xml Tue Oct 12 21:12:37 2010
@@ -110,7 +110,7 @@ of consuming threads only for connection
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxMemFree</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
+<directivesynopsis location="mpm_common"><name>MaxConnectionsPerChild</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxSpareThreads</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=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mpm_common.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mpm_common.xml Tue Oct 12 21:12:37 2010
@@ -326,22 +326,24 @@ to hold without calling <code>free()</co
 </directivesynopsis>
 
 <directivesynopsis>
-<name>MaxRequestsPerChild</name>
-<description>Limit on the number of requests that an individual child server
+<name>MaxConnectionsPerChild</name>
+<description>Limit on the number of connections that an individual child server
 will handle during its life</description>
-<syntax>MaxRequestsPerChild <var>number</var></syntax>
-<default>MaxRequestsPerChild 10000</default>
+<syntax>MaxConnectionsPerChild <var>number</var></syntax>
+<default>MaxConnectionsPerChild 10000</default>
 <contextlist><context>server config</context></contextlist>
 <modulelist><module>mpm_netware</module>
 <module>mpm_winnt</module><module>mpmt_os2</module>
 <module>prefork</module><module>worker</module></modulelist>
+<compatibility>Available Apache HTTP Server 2.3.9 and later. The old name
+<code>MaxRequestsPerChild</code> ist still supported.</compatibility>
 
 <usage>
-    <p>The <directive>MaxRequestsPerChild</directive> directive sets
-    the limit on the number of requests that an individual child
+    <p>The <directive>MaxConnectionsPerChild</directive> directive sets
+    the limit on the number of connections that an individual child
     server process will handle. After
-    <directive>MaxRequestsPerChild</directive> requests, the child
-    process will die. If <directive>MaxRequestsPerChild</directive> is
+    <directive>MaxConnectionsPerChild</directive> connections, the child
+    process will die. If <directive>MaxConnectionsPerChild</directive> is
     <code>0</code>, then the process will never expire.</p>
 
     <note><title>Different default values</title>
@@ -349,16 +351,9 @@ will handle during its life</description
       <module>mpm_winnt</module> is <code>0</code>.</p>
     </note>
 
-    <p>Setting <directive>MaxRequestsPerChild</directive> to a
+    <p>Setting <directive>MaxConnectionsPerChild</directive> to a
     non-zero value limits the amount of memory that process can consume
     by (accidental) memory leakage.</p>
-
-    <note><title>Note</title>
-      <p>For <directive module="core">KeepAlive</directive> requests, only
-      the first request is counted towards this limit. In effect, it
-      changes the behavior to limit the number of <em>connections</em> per
-      child.</p>
-    </note>
 </usage>
 </directivesynopsis>
 

Modified: httpd/httpd/trunk/docs/manual/mod/mpm_netware.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mpm_netware.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mpm_netware.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mpm_netware.xml Tue Oct 12 21:12:37 2010
@@ -55,7 +55,7 @@
     href="../misc/perf-tuning.html">performance hints</a>
     documentation.</p>
 
-    <p><directive module="mpm_common">MaxRequestsPerChild</directive>
+    <p><directive module="mpm_common">MaxConnectionsPerChild</directive>
     controls how frequently the server recycles processes by killing old
     ones and launching new ones. On the NetWare OS it is highly
     recommended that this directive remain set to 0. This allows worker
@@ -71,7 +71,7 @@
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxMemFree</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
+<directivesynopsis location="mpm_common"><name>MaxConnectionsPerChild</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
 </directivesynopsis>

Modified: httpd/httpd/trunk/docs/manual/mod/mpm_winnt.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mpm_winnt.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mpm_winnt.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mpm_winnt.xml Tue Oct 12 21:12:37 2010
@@ -44,7 +44,7 @@ NT.</description>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>ListenBacklog</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
+<directivesynopsis location="mpm_common"><name>MaxConnectionsPerChild</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxMemFree</name>
 </directivesynopsis>

Modified: httpd/httpd/trunk/docs/manual/mod/mpmt_os2.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mpmt_os2.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mpmt_os2.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mpmt_os2.xml Tue Oct 12 21:12:37 2010
@@ -59,7 +59,7 @@ uses</a></seealso>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>SendBufferSize</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
+<directivesynopsis location="mpm_common"><name>MaxConnectionsPerChild</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxSpareThreads</name>
 </directivesynopsis>

Modified: httpd/httpd/trunk/docs/manual/mod/prefork.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/prefork.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/prefork.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/prefork.xml Tue Oct 12 21:12:37 2010
@@ -81,7 +81,7 @@ uses</a></seealso>
     must be able to read all the content that will be served, but
     should have as few privileges beyond that as possible.</p>
 
-    <p><directive module="mpm_common">MaxRequestsPerChild</directive>
+    <p><directive module="mpm_common">MaxConnectionsPerChild</directive>
     controls how frequently the server recycles processes by killing
     old ones and launching new ones.</p>
 
@@ -108,7 +108,7 @@ uses</a></seealso>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxMemFree</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
+<directivesynopsis location="mpm_common"><name>MaxConnectionsPerChild</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>ScoreBoardFile</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=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/worker.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/worker.xml Tue Oct 12 21:12:37 2010
@@ -100,7 +100,7 @@
 
     <ul>
       <li>set the value of <directive module="mpm_common">
-      MaxRequestsPerChild</directive> to zero</li>
+      MaxConnectionsPerChild</directive> to zero</li>
 
       <li>set the value of <directive module="mpm_common">
       MaxSpareThreads</directive> to the same value as
@@ -131,7 +131,7 @@
     these directives also set the privileges which will be inherited
     by CGI scripts.</p>
 
-    <p><directive module="mpm_common">MaxRequestsPerChild</directive>
+    <p><directive module="mpm_common">MaxConnectionsPerChild</directive>
     controls how frequently the server recycles processes by killing
     old ones and launching new ones.</p>
 
@@ -160,7 +160,7 @@
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxMemFree</name>
 </directivesynopsis>
-<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
+<directivesynopsis location="mpm_common"><name>MaxConnectionsPerChild</name>
 </directivesynopsis>
 <directivesynopsis location="mpm_common"><name>MaxSpareThreads</name>
 </directivesynopsis>

Modified: httpd/httpd/trunk/docs/manual/platform/netware.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/platform/netware.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/platform/netware.xml (original)
+++ httpd/httpd/trunk/docs/manual/platform/netware.xml Tue Oct 12 21:12:37 2010
@@ -338,10 +338,10 @@
 
         <p>Therefore the "process"-management directives are different:</p>
 
-        <p><directive module="mpm_common">MaxRequestsPerChild</directive>
-
-        Like the Unix directive, this controls how many requests
+        <p><directive module="mpm_common">MaxConnectionsPerChild</directive>
-
+        Like the Unix directive, this controls how many connections
         a worker thread will serve before exiting. The recommended default,
-        <code>MaxRequestsPerChild 0</code>, causes the thread to continue servicing
+        <code>MaxConnectionsPerChild 0</code>, causes the thread to continue
servicing
         request indefinitely. It is recommended on NetWare, unless there is some
         specific reason, that this directive always remain set to <code>0</code>.</p>
 

Modified: httpd/httpd/trunk/docs/manual/platform/windows.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/platform/windows.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/platform/windows.xml (original)
+++ httpd/httpd/trunk/docs/manual/platform/windows.xml Tue Oct 12 21:12:37 2010
@@ -240,11 +240,11 @@
 
       <p>The process management directives are also different:</p>
 
-      <p><directive module="mpm_common">MaxRequestsPerChild</directive>:
-      Like the Unix directive, this controls how many requests (actually,
-      connections) which a single child process will serve before exiting.
+      <p><directive module="mpm_common">MaxConnectionsPerChild</directive>:
+      Like the Unix directive, this controls how many connections a single
+      child process will serve before exiting.
       However, unlike on Unix, a replacement process is not instantly
-      available.  Use the default <code>MaxRequestsPerChild 0</code>,
+      available.  Use the default <code>MaxConnectionsPerChild 0</code>,
       unless instructed to change the behavior to overcome a memory leak
       in third party modules or in-process applications.</p>
 

Modified: httpd/httpd/trunk/docs/manual/upgrading.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/upgrading.xml?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/upgrading.xml (original)
+++ httpd/httpd/trunk/docs/manual/upgrading.xml Tue Oct 12 21:12:37 2010
@@ -166,6 +166,10 @@
       configurations as discussed below.</p>
 
       <ul>
+        <li><directive>MaxRequestsPerChild</directive> has been renamed
to
+        <directive module="mpm_common">MaxConnectionsPerChild</directive>,
+        which describes more accurately what it does.</li>
+
         <li>The <directive module="core">DefaultType</directive>
         directive no longer has any effect, other than to emit a
         warning if it's used with any value other than

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Tue Oct 12 21:12:37 2010
@@ -3576,7 +3576,10 @@ AP_INIT_FLAG("SeeRequestTail", ap_set_re
 AP_INIT_TAKE1("PidFile",  ap_mpm_set_pidfile, NULL, RSRC_CONF,
               "A file for logging the server process ID"),
 AP_INIT_TAKE1("MaxRequestsPerChild", ap_mpm_set_max_requests, NULL, RSRC_CONF,
-              "Maximum number of requests a particular child serves before dying."),
+              "Maximum number of connections a particular child serves before "
+              "dying. (DEPRECATED, use MaxConnectionsPerChild)"),
+AP_INIT_TAKE1("MaxConnectionsPerChild", ap_mpm_set_max_requests, NULL, RSRC_CONF,
+              "Maximum number of connections a particular child serves before dying."),
 AP_INIT_TAKE1("CoreDumpDirectory", ap_mpm_set_coredumpdir, NULL, RSRC_CONF,
               "The location of the directory Apache changes to before dumping core"),
 AP_INIT_TAKE1("MaxMemFree", ap_mpm_set_max_mem_free, NULL, RSRC_CONF,

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Tue Oct 12 21:12:37 2010
@@ -763,7 +763,7 @@ read_request:
 }
 
 /* requests_this_child has gone to zero or below.  See if the admin coded
-   "MaxRequestsPerChild 0", and keep going in that case.  Doing it this way
+   "MaxConnectionsPerChild 0", and keep going in that case.  Doing it this way
    simplifies the hot path in worker_thread */
 static void check_infinite_requests(void)
 {
@@ -1779,7 +1779,7 @@ static void child_main(int child_num_arg
     else {                      /* !one_process */
         /* remove SIGTERM from the set of blocked signals...  if one of
          * the other threads in the process needs to take us down
-         * (e.g., for MaxRequestsPerChild) it will send us SIGTERM
+         * (e.g., for MaxConnectionsPerChild) it will send us SIGTERM
          */
         unblock_signal(SIGTERM);
         apr_signal(SIGTERM, dummy_signal_handler);

Modified: httpd/httpd/trunk/server/mpm/winnt/child.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/child.c?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/child.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/child.c Tue Oct 12 21:12:37 2010
@@ -737,7 +737,7 @@ static unsigned int __stdcall worker_mai
             break;
         }
 
-        /* Have we hit MaxRequestsPerChild connections? */
+        /* Have we hit MaxConnectionsPerChild connections? */
         if (ap_max_requests_per_child) {
             requests_this_child++;
             if (requests_this_child > ap_max_requests_per_child) {
@@ -1013,7 +1013,7 @@ void child_main(apr_pool_t *pconf)
      *
      * max_requests_per_child_event:
      *    This event is signaled by the worker threads to indicate that
-     *    the process has handled MaxRequestsPerChild connections.
+     *    the process has handled MaxConnectionsPerChild connections.
      *
      * TIMEOUT:
      *    To do periodic maintenance on the server (check for thread exits,
@@ -1058,12 +1058,12 @@ void child_main(apr_pool_t *pconf)
             break;
         }
         else {
-            /* MaxRequestsPerChild event set by the worker threads.
+            /* MaxConnectionsPerChild event set by the worker threads.
              * Signal the parent to restart
              */
             ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
                          "Child %d: Process exiting because it reached "
-                         "MaxRequestsPerChild. Signaling the parent to "
+                         "MaxConnectionsPerChild. Signaling the parent to "
                          "restart a new child process.", my_pid);
             ap_signal_parent(SIGNAL_PARENT_RESTART);
             break;

Modified: httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c Tue Oct 12 21:12:37 2010
@@ -701,7 +701,7 @@ static int create_process(apr_pool_t *p,
  *    translated into an ap_signal_parent(SIGNAL_PARENT_RESTART)
  *    call by code in service.c.
  * 3. The child process calling ap_signal_parent(SIGNAL_PARENT_RESTART)
- *    as a result of hitting MaxRequestsPerChild.
+ *    as a result of hitting MaxConnectionsPerChild.
  *
  * shutdown_event
  * --------------

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Tue Oct 12 21:12:37 2010
@@ -564,7 +564,7 @@ static void process_socket(apr_thread_t 
 }
 
 /* requests_this_child has gone to zero or below.  See if the admin coded
-   "MaxRequestsPerChild 0", and keep going in that case.  Doing it this way
+   "MaxConnectionsPerChild 0", and keep going in that case.  Doing it this way
    simplifies the hot path in worker_thread */
 static void check_infinite_requests(void)
 {
@@ -1276,7 +1276,7 @@ static void child_main(int child_num_arg
     else { /* !one_process */
         /* remove SIGTERM from the set of blocked signals...  if one of
          * the other threads in the process needs to take us down
-         * (e.g., for MaxRequestsPerChild) it will send us SIGTERM
+         * (e.g., for MaxConnectionsPerChild) it will send us SIGTERM
          */
         unblock_signal(SIGTERM);
         apr_signal(SIGTERM, dummy_signal_handler);

Modified: httpd/httpd/trunk/server/mpm_common.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_common.c?rev=1021924&r1=1021923&r2=1021924&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm_common.c (original)
+++ httpd/httpd/trunk/server/mpm_common.c Tue Oct 12 21:12:37 2010
@@ -253,6 +253,12 @@ const char *ap_mpm_set_max_requests(cmd_
         return err;
     }
 
+    if (!strcasecmp(cmd->cmd->name, "MaxRequestsPerChild")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
+                     "MaxRequestsPerChild is deprecated, use "
+                     "MaxConnectionsPerChild instead.");
+    }
+
     ap_max_requests_per_child = atoi(arg);
 
     return NULL;



Mime
View raw message