From: Stefan Fritsch Date: Tue, 12 Oct 2010 21:12:37 +0000 (+0000) Subject: Rename MaxRequestsPerChild to MaxConnectionsPerChild, which X-Git-Tag: 2.3.9~331 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bcd082e3d0d1e4a533348db6127463e96252fda;p=thirdparty%2Fapache%2Fhttpd.git Rename MaxRequestsPerChild to MaxConnectionsPerChild, which describes more accurately what the directive does. The old name still works but logs a warning. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021924 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index d41c9a173d5..134f02746e0 100644 --- a/CHANGES +++ b/CHANGES @@ -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] diff --git a/STATUS b/STATUS index b5b4943f17a..1c1b1cf2b03 100644 --- a/STATUS +++ b/STATUS @@ -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 diff --git a/docs/conf/extra/httpd-mpm.conf.in b/docs/conf/extra/httpd-mpm.conf.in index a6fab6dbd5f..d4679592bd6 100644 --- a/docs/conf/extra/httpd-mpm.conf.in +++ b/docs/conf/extra/httpd-mpm.conf.in @@ -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 - StartServers 5 - MinSpareServers 5 - MaxSpareServers 10 - MaxClients 150 - MaxRequestsPerChild 0 + StartServers 5 + MinSpareServers 5 + MaxSpareServers 10 + MaxClients 150 + MaxConnectionsPerChild 0 # 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 - StartServers 2 - MaxClients 150 - MinSpareThreads 25 - MaxSpareThreads 75 - ThreadsPerChild 25 - MaxRequestsPerChild 0 + StartServers 2 + MaxClients 150 + MinSpareThreads 25 + MaxSpareThreads 75 + ThreadsPerChild 25 + MaxConnectionsPerChild 0 # 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 - StartServers 2 - MaxClients 150 - MinSpareThreads 25 - MaxSpareThreads 75 - ThreadsPerChild 25 - MaxRequestsPerChild 0 + StartServers 2 + MaxClients 150 + MinSpareThreads 25 + MaxSpareThreads 75 + ThreadsPerChild 25 + MaxConnectionsPerChild 0 # 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. ThreadStackSize 65536 StartThreads 250 MinSpareThreads 25 MaxSpareThreads 250 MaxThreads 1000 - MaxRequestsPerChild 0 + MaxConnectionsPerChild 0 MaxMemFree 100 @@ -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 - StartServers 2 - MinSpareThreads 5 - MaxSpareThreads 10 - MaxRequestsPerChild 0 + StartServers 2 + MinSpareThreads 5 + MaxSpareThreads 10 + MaxConnectionsPerChild 0 # 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 - ThreadsPerChild 150 - MaxRequestsPerChild 0 + ThreadsPerChild 150 + MaxConnectionsPerChild 0 diff --git a/docs/manual/misc/perf-tuning.xml b/docs/manual/misc/perf-tuning.xml index 21d58cbb97c..64f9582f4c7 100644 --- a/docs/manual/misc/perf-tuning.xml +++ b/docs/manual/misc/perf-tuning.xml @@ -398,9 +398,9 @@ Use the mod_status output as a guide.

Related to process creation is process death induced by the - MaxRequestsPerChild + MaxConnectionsPerChild setting. By default this is 0, - 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 30, you may want to bump this up significantly. If you are running SunOS or an old version of diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index ec79895825e..2d354955c8d 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -1792,7 +1792,7 @@ wildcard matching available in 2.3.6 and later

When a client uses a Keep-Alive connection it will be counted as a single "request" for the MaxRequestsPerChild directive, regardless + >MaxConnectionsPerChild directive, regardless of how many requests are sent using the connection.

diff --git a/docs/manual/mod/event.xml b/docs/manual/mod/event.xml index 354f6d0e8c8..cab1adf516a 100644 --- a/docs/manual/mod/event.xml +++ b/docs/manual/mod/event.xml @@ -110,7 +110,7 @@ of consuming threads only for connections with active processing MaxMemFree -MaxRequestsPerChild +MaxConnectionsPerChild MaxSpareThreads diff --git a/docs/manual/mod/mpm_common.xml b/docs/manual/mod/mpm_common.xml index 6d6335a0aec..b78d9764f87 100644 --- a/docs/manual/mod/mpm_common.xml +++ b/docs/manual/mod/mpm_common.xml @@ -326,22 +326,24 @@ to hold without calling free() -MaxRequestsPerChild -Limit on the number of requests that an individual child server +MaxConnectionsPerChild +Limit on the number of connections that an individual child server will handle during its life -MaxRequestsPerChild number -MaxRequestsPerChild 10000 +MaxConnectionsPerChild number +MaxConnectionsPerChild 10000 server config mpm_netware mpm_winntmpmt_os2 preforkworker +Available Apache HTTP Server 2.3.9 and later. The old name +MaxRequestsPerChild ist still supported. -

The MaxRequestsPerChild directive sets - the limit on the number of requests that an individual child +

The MaxConnectionsPerChild directive sets + the limit on the number of connections that an individual child server process will handle. After - MaxRequestsPerChild requests, the child - process will die. If MaxRequestsPerChild is + MaxConnectionsPerChild connections, the child + process will die. If MaxConnectionsPerChild is 0, then the process will never expire.

Different default values @@ -349,16 +351,9 @@ will handle during its life
mpm_winnt is 0.

-

Setting MaxRequestsPerChild to a +

Setting MaxConnectionsPerChild to a non-zero value limits the amount of memory that process can consume by (accidental) memory leakage.

- - Note -

For KeepAlive requests, only - the first request is counted towards this limit. In effect, it - changes the behavior to limit the number of connections per - child.

-
diff --git a/docs/manual/mod/mpm_netware.xml b/docs/manual/mod/mpm_netware.xml index 11e4a94f17f..5ea65a50f3e 100644 --- a/docs/manual/mod/mpm_netware.xml +++ b/docs/manual/mod/mpm_netware.xml @@ -55,7 +55,7 @@ href="../misc/perf-tuning.html">performance hints documentation.

-

MaxRequestsPerChild +

MaxConnectionsPerChild 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 @@ MaxMemFree -MaxRequestsPerChild +MaxConnectionsPerChild ReceiveBufferSize diff --git a/docs/manual/mod/mpm_winnt.xml b/docs/manual/mod/mpm_winnt.xml index eb5d7a22d6b..2b5fa4af0d5 100644 --- a/docs/manual/mod/mpm_winnt.xml +++ b/docs/manual/mod/mpm_winnt.xml @@ -44,7 +44,7 @@ NT. ListenBacklog -MaxRequestsPerChild +MaxConnectionsPerChild MaxMemFree diff --git a/docs/manual/mod/mpmt_os2.xml b/docs/manual/mod/mpmt_os2.xml index 81b7fc9d62b..c7da33ddfe3 100644 --- a/docs/manual/mod/mpmt_os2.xml +++ b/docs/manual/mod/mpmt_os2.xml @@ -59,7 +59,7 @@ uses SendBufferSize -MaxRequestsPerChild +MaxConnectionsPerChild MaxSpareThreads diff --git a/docs/manual/mod/prefork.xml b/docs/manual/mod/prefork.xml index 4ffa4d5d73e..03c72c755f3 100644 --- a/docs/manual/mod/prefork.xml +++ b/docs/manual/mod/prefork.xml @@ -81,7 +81,7 @@ uses must be able to read all the content that will be served, but should have as few privileges beyond that as possible.

-

MaxRequestsPerChild +

MaxConnectionsPerChild controls how frequently the server recycles processes by killing old ones and launching new ones.

@@ -108,7 +108,7 @@ uses MaxMemFree -MaxRequestsPerChild +MaxConnectionsPerChild ScoreBoardFile diff --git a/docs/manual/mod/worker.xml b/docs/manual/mod/worker.xml index e2ca80edd8c..0e8ae165066 100644 --- a/docs/manual/mod/worker.xml +++ b/docs/manual/mod/worker.xml @@ -100,7 +100,7 @@