mpm_common.xml revision fb6c0c7c223eff88e1bdb47b3ab85f0d7ee2ca81
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<!-- $LastChangedRevision$ -->
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Licensed to the Apache Software Foundation (ASF) under one or more
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync contributor license agreements. See the NOTICE file distributed with
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync this work for additional information regarding copyright ownership.
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync The ASF licenses this file to You under the Apache License, Version 2.0
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync (the "License"); you may not use this file except in compliance with
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync the License. You may obtain a copy of the License at
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync Unless required by applicable law or agreed to in writing, software
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync distributed under the License is distributed on an "AS IS" BASIS,
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync See the License for the specific language governing permissions and
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync limitations under the License.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>A collection of directives that are implemented by
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsyncmore than one multi-processing module (MPM)</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Directory where Apache HTTP Server attempts to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncswitch before dumping core</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>CoreDumpDirectory <var>directory</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>See usage for the default setting</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>event</module><module>prefork</module>
5eabf773597082761832bc0a32b3660e8771f9f1vboxsync <p>This controls the directory to which Apache httpd attempts to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync switch before dumping core. If your operating system is configured to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync create core files in the working directory of the crashing process,
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive>CoreDumpDirectory</directive> is necessary to change working
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync directory from the default <directive module="core">ServerRoot</directive>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync directory, which should not be writable by the user the server runs as.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>If you want a core dump for debugging, you can use this directive to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync place it in a different location. This directive has no effect if your
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync operating system is not configured to write core files to the working directory
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync of the crashing processes.</p>
b1af3faab73d10122abc6a77cc3811657b6300f1vboxsync <p>If Apache httpd starts as root and switches to another user, the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Linux kernel <em>disables</em> core dumps even if the directory is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync writable for the process. Apache httpd (2.0.46 and later) reenables core dumps
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync on Linux 2.4 and beyond, but only if you explicitly configure a <directive
4c1959cb05f17e7a71ace7cb1796292247f732e8vboxsync <p><directive>CoreDumpDirectory</directive> processing only occurs for
4c1959cb05f17e7a71ace7cb1796292247f732e8vboxsync a select set of fatal signals: SIGFPE, SIGILL, SIGABORT,
4c1959cb05f17e7a71ace7cb1796292247f732e8vboxsync SIGSEGV, and SIGBUS.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>On some operating systems, SIGQUIT also results in a core dump but
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync does not go through <directive>CoreDumpDirectory</directive> or
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive>EnableExceptionHook</directive> processing, so the core
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync location is dictated entirely by the operating system.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Enables a hook that runs exception handlers
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncafter a crash</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<compatibility>Available in version 2.0.49 and later</compatibility>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>For safety reasons this directive is only available if the server was
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync configured with the <code>--enable-exception-hook</code> option. It
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync enables a hook that allows external modules to plug in and do something
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync after a child crashed.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>There are already two modules, <code>mod_whatkilledus</code> and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>mod_backtrace</code> that make use of this hook. Please have a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync look at Jeff Trawick's <a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync href="http://www.apache.org/~trawick/exception_hook.html"
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync >EnableExceptionHook site</a> for more information about these.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Specify a timeout after which a gracefully shutdown server
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncwill exit.</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>GracefulShutDownTimeout <var>seconds</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>prefork</module><module>worker</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<compatibility>Available in version 2.2 and later</compatibility>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>GracefulShutdownTimeout</directive> specifies
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync how many seconds after receiving a "graceful-stop" signal, a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync server should continue to run, handling the existing connections.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>Setting this value to zero means that the server will wait
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync indefinitely until all remaining requests have been fully served.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>File where the server records the process ID
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncof the daemon</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>event</module><module>mpm_winnt</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpmt_os2</module><module>prefork</module><module>worker</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>PidFile</directive> directive sets the file to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync which the server records the process id of the daemon. If the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync filename is not absolute then it is assumed to be relative to the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="core">ServerRoot</directive>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>It is often useful to be able to send the server a signal,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync so that it closes and then re-opens its <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mod_log_config">TransferLog</directive>, and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync re-reads its configuration files. This is done by sending a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync SIGHUP (kill -1) signal to the process id listed in the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>PidFile</directive> is subject to the same
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync warnings about log file placement and <a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync href="/misc/security_tips.html#serverroot">security</a>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>As of Apache HTTP Server 2, we recommended that you only use the <program>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync apachectl</program> script, or the init script that your OS provides,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync for (re-)starting or stopping the server.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>IP addresses and ports that the server
bff1915a855c5b71d76f6391549eadda348e33b0vboxsynclistens to</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>Listen [<var>IP-address</var>:]<var>portnumber</var> [<var>protocol</var>]</syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>mpm_netware</module><module>mpm_winnt</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<compatibility>Required directive since Apache HTTP Server 2.0<br/>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncThe <var>protocol</var> argument was added in 2.1.5</compatibility>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>Listen</directive> directive instructs Apache httpd to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync listen to only specific IP addresses or ports; by default it
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync responds to requests on all IP interfaces. <directive>Listen</directive>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync is now a required directive. If it is not in the config file, the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync server will fail to start. This is a change from previous versions
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync of Apache httpd.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>Listen</directive> directive tells the server to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync accept incoming requests on the specified port or address-and-port
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync combination. If only a port number is specified, the server listens to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the given port on all interfaces. If an IP address is given as well
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync as a port, the server will listen on the given port and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync interface.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>Multiple <directive>Listen</directive> directives may be used to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync specify a number of addresses and ports to listen to. The server will
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync respond to requests from any of the listed addresses and ports.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>For example, to make the server accept connections on both
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync port 80 and port 8000, use:</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Listen 80<br />
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Listen 8000
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>To make the server accept connections on two specified
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync interfaces and port numbers, use </p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Listen 192.170.2.1:80<br />
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Listen 192.170.2.5:8000
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>IPv6 addresses must be surrounded in square brackets, as in the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync following example:</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Listen [2001:db8::a00:20ff:fea7:ccea]:80
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The optional <var>protocol</var> argument is not required for most
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync configurations. If not specified, <code>https</code> is the default for
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync port 443 and <code>http</code> the default for all other ports. The
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync protocol is used to determine which module should handle a request, and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync to apply protocol specific optimizations with the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="core">AcceptFilter</directive> directive.</p>
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync <p>You only need to set the protocol if you are running on non-standard
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync ports. For example, running an <code>https</code> site on port 8443:</p>
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync Listen 192.170.2.1:8443 https
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Multiple <directive>Listen</directive> directives for the same ip
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync address and port will result in an <code>Address already in use</code>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync error message.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<seealso><a href="/dns-caveats.html">DNS Issues</a></seealso>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<seealso><a href="/bind.html">Setting which addresses and ports Apache HTTP Server
bff1915a855c5b71d76f6391549eadda348e33b0vboxsynchref="http://wiki.apache.org/httpd/CouldNotBindToAddress">Further
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncdiscussion of the <code>Address already in use</code> error message,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Maximum length of the queue of pending connections</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpm_netware</module><module>mpm_winnt</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The maximum length of the queue of pending connections.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Generally no tuning is needed or desired, however on some
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync systems it is desirable to increase this when under a TCP SYN
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync flood attack. See the backlog parameter to the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>This will often be limited to a smaller number by the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync operating system. This varies from OS to OS. Also note that
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync many OSes do not use exactly what is specified as the backlog,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync but use a number based on (but normally larger than) what is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Maximum number of connections that will be processed
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncsimultaneously</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<modulelist><module>event</module><module>prefork</module>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</modulelist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <p>The <directive>MaxClients</directive> directive sets the limit
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync on the number of simultaneous requests that will be served. Any
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync connection attempts over the <directive>MaxClients</directive>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync limit will normally be queued, up to a number based on the
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <directive module="mpm_common">ListenBacklog</directive>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync directive. Once a child process is freed at the end of a different
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync request, the connection will then be serviced.</p>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <p>For non-threaded servers (<em>i.e.</em>, <module>prefork</module>),
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <directive>MaxClients</directive> translates into the maximum
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync number of child processes that will be launched to serve requests.
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync The default value is <code>256</code>; to increase it, you must also raise
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <directive module="mpm_common">ServerLimit</directive>.</p>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <p>For threaded and hybrid servers (<em>e.g.</em> <module>event</module>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync or <module>worker</module>) <directive>MaxClients</directive> restricts
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync the total number of threads that will be available to serve clients.
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync For hybrid MPMs the default value is <code>16</code> (<directive
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync module="mpm_common">ServerLimit</directive>) multiplied by the value of
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync >ThreadsPerChild</directive>). Therefore, to increase <directive
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync >MaxClients</directive> to a value that requires more than 16 processes,
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</directivesynopsis>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<directivesynopsis>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<description>Maximum amount of memory that the main allocator is allowed
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsyncto hold without calling <code>free()</code></description>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<contextlist><context>server config</context></contextlist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<modulelist><module>event</module><module>mpm_netware</module>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<module>prefork</module><module>worker</module><module>mpm_winnt</module>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</modulelist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <p>The <directive>MaxMemFree</directive> directive sets the
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync maximum number of free Kbytes that the main allocator is allowed
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync to hold without calling <code>free()</code>. When not set, or when set
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync to zero, the threshold will be set to unlimited.</p>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</directivesynopsis>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<directivesynopsis>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<description>Limit on the number of connections that an individual child server
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsyncwill handle during its life</description>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<syntax>MaxConnectionsPerChild <var>number</var></syntax>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<contextlist><context>server config</context></contextlist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<modulelist><module>event</module><module>mpm_netware</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>prefork</module><module>worker</module></modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<compatibility>Available Apache HTTP Server 2.3.9 and later. The old name
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<code>MaxRequestsPerChild</code> is still supported.</compatibility>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>MaxConnectionsPerChild</directive> directive sets
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync the limit on the number of connections that an individual child
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync server process will handle. After
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive>MaxConnectionsPerChild</directive> connections, the child
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync process will die. If <directive>MaxConnectionsPerChild</directive> is
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <code>0</code>, then the process will never expire.</p>
353a4d1d78e3be140fa5ac56fbde62a413cb34c5vboxsync <p>Setting <directive>MaxConnectionsPerChild</directive> to a
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync non-zero value limits the amount of memory that process can consume
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync by (accidental) memory leakage.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Maximum number of idle threads</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>event</module><module>mpm_netware</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpmt_os2</module><module>worker</module></modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Maximum number of idle threads. Different MPMs deal with this
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync directive differently.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <code>MaxSpareThreads 250</code>. This MPM deals with idle threads
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync on a server-wide basis. If there are too many idle threads in the
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync server then child processes are killed until the number of idle
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync threads is less than this number.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <code>MaxSpareThreads 100</code>. Since this MPM runs a
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync single-process, the spare thread count is also server-wide.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <module>mpmt_os2</module> the default value is <code>10</code>.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>The range of the <directive>MaxSpareThreads</directive> value
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync is restricted. Apache httpd will correct the given value automatically
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync according to the following rules:</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <li><module>mpm_netware</module> wants the value to be greater than
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive module="mpm_common">MinSpareThreads</directive>.</li>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <li>For <module>worker</module>, the value must be greater or equal
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync to the sum of <directive module="mpm_common">MinSpareThreads</directive>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync and <directive module="mpm_common">ThreadsPerChild</directive>.</li>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<seealso><directive module="mpm_common">MinSpareThreads</directive></seealso>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<seealso><directive module="mpm_common">StartServers</directive></seealso>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<seealso><directive module="prefork">MaxSpareServers</directive></seealso>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<description>Minimum number of idle threads available to handle request
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsyncspikes</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>event</module><module>mpm_netware</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpmt_os2</module><module>worker</module></modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>Minimum number of idle threads to handle request spikes.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Different MPMs deal with this directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync differently.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p><module>worker</module> uses a default of <code>MinSpareThreads
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync 75</code> and deals with idle threads on a server-wide basis. If
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync there aren't enough idle threads in the server then child
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync processes are created until the number of idle threads is greater
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <code>MinSpareThreads 10</code> and, since it is a single-process
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync MPM, tracks this on a server-wide bases.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <module>mpmt_os2</module> the default value is <code>5</code>.</p>
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync<seealso><directive module="mpm_common">MaxSpareThreads</directive></seealso>
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync<seealso><directive module="mpm_common">StartServers</directive></seealso>
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync<seealso><directive module="prefork">MinSpareServers</directive></seealso>
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
4298177987f623deb1268c06d3681510bc49a594vboxsync<description>Location of the file used to store coordination data for
03aef08d59dd179fd178a35f445e731788896cabvboxsyncthe child processes</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>ScoreBoardFile <var>file-path</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>ScoreBoardFile logs/apache_status</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>event</module><module>mpm_winnt</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>prefork</module><module>worker</module></modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Apache HTTP Server uses a scoreboard to communicate between its parent
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync and child processes. Some architectures require a file to facilitate
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync this communication. If the file is left unspecified, Apache httpd first
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync attempts to create the scoreboard entirely in memory (using anonymous
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync shared memory) and, failing that, will attempt to create the file on
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync disk (using file-based shared memory). Specifying this directive causes
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync Apache httpd to always create the file on the disk.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>File-based shared memory is useful for third-party applications
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync that require direct access to the scoreboard.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>If you use a <directive>ScoreBoardFile</directive> then
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync you may see improved speed by placing it on a RAM disk. But be
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync careful that you heed the same warnings about log file placement
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync and <a href="/misc/security_tips.html">security</a>.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<seealso><a href="/stopping.html">Stopping and Restarting
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27ff3359094d10df126ef7c1009920d3a94d5bb7vboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>event</module><module>mpm_netware</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpm_winnt</module><module>mpmt_os2</module><module>prefork</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>The server will set the TCP receive buffer size to the number of
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync bytes specified.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>If set to the value of <code>0</code>, the server will use the
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync OS default.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>event</module><module>mpm_netware</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpm_winnt</module><module>mpmt_os2</module><module>prefork</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Sets the server's TCP send buffer size to the number of bytes
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync specified. It is often useful to set this past the OS's standard
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync default value on high speed, high latency conections
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync (<em>i.e.</em>, 100ms or so, such as transcontinental fast pipes).</p>
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync <p>If set to the value of <code>0</code>, the server will use the
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync default value provided by your OS.</p>
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync <p>Further configuration of your operating system may be required to elicit
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync better performance on high speed, high latency connections.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note> <p> On some operating systems, changes in TCP behavior resulting
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync from a larger <directive>SendBufferSize</directive> may not be seen unless
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive module="core">EnableSendfile</directive> is set to OFF. This
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync interaction applies only to static files.</p> </note>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<description>Upper limit on configurable number of processes</description>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>event</module><module>prefork</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>For the <module>prefork</module> MPM, this directive sets the
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync maximum configured value for <directive
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync module="mpm_common">MaxClients</directive> for the lifetime of the
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync Apache httpd process. For the <module>worker</module> MPM, this directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync in combination with <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync the maximum configured value for <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">MaxClients</directive> for the lifetime of the
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync Apache httpd process. Any attempts to change this directive during a
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync restart will be ignored, but <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">MaxClients</directive> can be modified during
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync a restart.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Special care must be taken when using this directive. If
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive>ServerLimit</directive> is set to a value much higher
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync than necessary, extra, unused shared memory will be allocated. If
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync both <directive>ServerLimit</directive> and <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">MaxClients</directive> are set to values
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync higher than the system can handle, Apache httpd may not start or the
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync system may become unstable.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>With the <module>prefork</module> MPM, use this directive only
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync if you need to set <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">MaxClients</directive> higher than 256 (default).
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync Do not set the value of this directive any higher than what you
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync might want to set <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>With <module>worker</module>, use this directive only
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync if your <directive module="mpm_common">MaxClients</directive> and
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive module="mpm_common">ThreadsPerChild</directive>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync settings require more than 16 server processes (default). Do not set
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync the value of this directive any higher than the number of server
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync processes required by what you may want for <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">MaxClients </directive> and <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">ThreadsPerChild</directive>.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>There is a hard limit of <code>ServerLimit 20000</code> compiled
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync into the server (for the <module>prefork</module> MPM 200000). This is
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync intended to avoid nasty effects caused by typos. To increase it
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync even further past this limit, you will need to modify the value of
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync MAX_SERVER_LIMIT in the mpm source file and rebuild the server.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<seealso><a href="/stopping.html">Stopping and Restarting Apache HTTP Server</a></seealso>
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync</directivesynopsis>
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync<directivesynopsis>
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync<description>Number of child server processes created at startup</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>event</module><module>mpmt_os2</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>The <directive>StartServers</directive> directive sets the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync number of child server processes created on startup. As the number
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync of processes is dynamically controlled depending on the load, (see
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="mpm_common">MinSpareThreads</directive>,
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive module="mpm_common">MaxSpareThreads</directive>,
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive module="prefork">MinSpareServers</directive>, <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync there is usually little reason to adjust this parameter.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>The default value differs from MPM to MPM. <module>worker</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync defaults to <code>StartServers 3</code>; <module>prefork</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync defaults to <code>5</code>; <module>mpmt_os2</module> defaults to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Number of threads created on startup</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>mpm_netware</module></modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Number of threads created on startup. As the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync number of threads is dynamically controlled depending on the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="mpm_common">MinSpareThreads</directive>,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="mpm_common">MaxSpareThreads</directive>,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="prefork">MinSpareServers</directive>, <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync there is usually little reason to adjust this
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync parameter.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>StartThreads 50</code> and, since there is only a single
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync process, this is the total number of threads created at startup to
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync serve requests.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Sets the upper limit on the configurable number of threads
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsyncper child process</description>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync<contextlist><context>server config</context></contextlist>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync<modulelist><module>event</module><module>mpm_winnt</module>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync<compatibility>Available for <module>mpm_winnt</module> in Apache HTTP Server 2.0.41
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsyncand later</compatibility>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync <p>This directive sets the maximum configured value for <directive
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync module="mpm_common">ThreadsPerChild</directive> for the lifetime
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync of the Apache httpd process. Any attempts to change this directive
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync during a restart will be ignored, but <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">ThreadsPerChild</directive> can be modified
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync during a restart up to the value of this directive.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>Special care must be taken when using this directive. If
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync <directive>ThreadLimit</directive> is set to a value much higher
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync than <directive module="mpm_common">ThreadsPerChild</directive>,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync extra unused shared memory will be allocated. If both
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync module="mpm_common">ThreadsPerChild</directive> are set to values
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync higher than the system can handle, Apache httpd may not start or the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync system may become unstable. Do not set the value of this directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync any higher than your greatest predicted setting of <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">ThreadsPerChild</directive> for the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync current run of Apache httpd.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The default value for <directive>ThreadLimit</directive> is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>1920</code> when used with <module>mpm_winnt</module> and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>There is a hard limit of <code>ThreadLimit 20000</code> (or
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>ThreadLimit 15000</code> with <module>mpm_winnt</module>)
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync compiled into the server. This is intended to avoid nasty effects
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync caused by typos. To increase it even further past this limit, you
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync will need to modify the value of MAX_THREAD_LIMIT in the mpm
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync source file and rebuild the server.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Number of threads created by each child process</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>event</module><module>mpm_winnt</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>This directive sets the number of threads created by each
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync child process. The child creates these threads at startup and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync never creates more. If using an MPM like <module>mpm_winnt</module>,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync where there is only one child process, this number should be high
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync enough to handle the entire load of the server. If using an MPM
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync like <module>worker</module>, where there are multiple child processes,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the <em>total</em> number of threads should be high enough to handle
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the common load on the server.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The default value for <directive>ThreadsPerChild</directive> is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>64</code> when used with <module>mpm_winnt</module> and
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync</directivesynopsis>
cd0318d4ff9c5a7539bea1672f9bcbbf57e59095vboxsync<directivesynopsis>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<description>The size in bytes of the stack used by threads handling
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncclient connections</description>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<default>65536 on NetWare; varies on other operating systems</default>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<contextlist><context>server config</context></contextlist>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<modulelist><module>event</module><module>mpm_netware</module>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<module>mpmt_os2</module><module>mpm_winnt</module><module>worker</module>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync</modulelist>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<compatibility>Available in Apache HTTP Server 2.1 and later</compatibility>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync <p>The <directive>ThreadStackSize</directive> directive sets the
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync size of the stack (for autodata) of threads which handle client
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync connections and call modules to help process those connections.
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync In most cases the operating system default for stack size is
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync reasonable, but there are some conditions where it may need to be
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync adjusted:</p>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync <li>On platforms with a relatively small default thread stack size
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync (e.g., HP-UX), Apache httpd may crash when using some third-party modules
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync which use a relatively large amount of autodata storage. Those
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync same modules may have worked fine on other platforms where the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync default thread stack size is larger. This type of crash is
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync resolved by setting <directive>ThreadStackSize</directive> to a
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync value higher than the operating system default. This type of
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync adjustment is necessary only if the provider of the third-party
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module specifies that it is required, or if diagnosis of an Apache httpd
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync crash indicates that the thread stack size was too small.</li>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <li>On platforms where the default thread stack size is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync significantly larger than necessary for the web server
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync configuration, a higher number of threads per child process
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync will be achievable if <directive>ThreadStackSize</directive> is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync set to a value lower than the operating system default. This type
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync of adjustment should only be made in a test environment which allows
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the full set of web server processing can be exercised, as there
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync may be infrequent requests which require more stack to process.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync The minimum required stack size strongly depends on the modules
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync used, but any change in the web server configuration can invalidate
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the current <directive>ThreadStackSize</directive> setting.</li>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <li>On Linux, this directive can only be used to increase the default
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync stack size, as the underlying system call uses the value as a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <em>minimum</em> stack size. The (often large) soft limit for
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>ulimit -s</code> (8MB if unlimited) is used as the default stack
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note>It is recommended to not reduce <directive>ThreadStackSize</directive>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync unless a high number of threads per child process is needed. On some
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync platforms (including Linux), a setting of 128000 is already too low and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync causes crashes with some common modules.</note>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</modulesynopsis>