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