mpm_common.html.en revision b3e26602840efbc44504b773a2e54c55dc4fb064
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding This file is generated from xml source: DO NOT EDIT
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<link href="/images/favicon.ico" rel="shortcut icon" /></head>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<p class="apache">Apache HTTP Server Version 2.3</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a> > <a href="./">Modules</a></div>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<div id="preamble"><h1>Apache MPM Common Directives</h1>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<p><span>Available Languages: </span><a href="/de/mod/mpm_common.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<a href="/en/mod/mpm_common.html" title="English"> en </a> |
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<a href="/ja/mod/mpm_common.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<a href="/tr/mod/mpm_common.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>A collection of directives that are implemented by
0f081398cf0eef8cc7c66a535d450110a92dc8aefieldingmore than one multi-processing module (MPM)</td></tr>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<tr><th><a href="module-dict.html#Status">Status:</a></th><td>MPM</td></tr></table>
64185f9824e42f21ca7b9ae6c004484215c031a7rbb<div id="quickview"><h3 class="directives">Directives</h3>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#coredumpdirectory">CoreDumpDirectory</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#enableexceptionhook">EnableExceptionHook</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#gracefulshutdowntimeout">GracefulShutdownTimeout</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#listen">Listen</a></li>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<li><img alt="" src="/images/down.gif" /> <a href="#listenbacklog">ListenBackLog</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#maxclients">MaxClients</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#maxmemfree">MaxMemFree</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#maxrequestsperchild">MaxRequestsPerChild</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#maxsparethreads">MaxSpareThreads</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#minsparethreads">MinSpareThreads</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#pidfile">PidFile</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#receivebuffersize">ReceiveBufferSize</a></li>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<li><img alt="" src="/images/down.gif" /> <a href="#scoreboardfile">ScoreBoardFile</a></li>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<li><img alt="" src="/images/down.gif" /> <a href="#sendbuffersize">SendBufferSize</a></li>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<li><img alt="" src="/images/down.gif" /> <a href="#serverlimit">ServerLimit</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#startservers">StartServers</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#startthreads">StartThreads</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#threadlimit">ThreadLimit</a></li>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<li><img alt="" src="/images/down.gif" /> <a href="#threadsperchild">ThreadsPerChild</a></li>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<li><img alt="" src="/images/down.gif" /> <a href="#threadstacksize">ThreadStackSize</a></li>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<div class="directive-section"><h2><a name="CoreDumpDirectory" id="CoreDumpDirectory">CoreDumpDirectory</a> <a name="coredumpdirectory" id="coredumpdirectory">Directive</a></h2>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory where Apache attempts to
b6055b7832a0e4d0818416252fff5925aaebae4brbb<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CoreDumpDirectory <var>directory</var></code></td></tr>
2d71630471d1c23f0137309e3c3957c633ecbfd6rbb<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for the default setting</code></td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>This controls the directory to which Apache attempts to
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding switch before dumping core. If your operating system is configured to
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding create core files in the working directory of the crashing process,
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <code class="directive">CoreDumpDirectory</code> is necessary to change working
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding directory from the default <code class="directive"><a href="/mod/core.html#serverroot">ServerRoot</a></code>
3d96ee83babeec32482c9082c9426340cee8c44dwrowe directory, which should not be writable by the user the server runs as.</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>If you want a core dump for debugging, you can use this directive to
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm place it in a different location. This directive has no effect if your
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding operating system is not configured to write core files to the working directory
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding of the crashing processes.</p>
4f9a74ad7e44b0464f7cf56525a205d788becacbtrawick <p>If Apache starts as root and switches to another user, the
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Linux kernel <em>disables</em> core dumps even if the directory is
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding writable for the process. Apache (2.0.46 and later) reenables core dumps
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding on Linux 2.4 and beyond, but only if you explicitly configure a <code class="directive">CoreDumpDirectory</code>.</p>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm <p><code class="directive">CoreDumpDirectory</code> processing only occurs for
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding a select set of fatal signals: SIGFPE, SIGILL, SIGABORT,
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding SIGSEGV, and SIGBUS.</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>On some operating systems, SIGQUIT also results in a core dump but
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding does not go through <code class="directive">CoreDumpDirectory</code> or
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <code class="directive">EnableExceptionHook</code> processing, so the core
4f9a74ad7e44b0464f7cf56525a205d788becacbtrawick location is dictated entirely by the operating system.</p>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<div class="directive-section"><h2><a name="EnableExceptionHook" id="EnableExceptionHook">EnableExceptionHook</a> <a name="enableexceptionhook" id="enableexceptionhook">Directive</a></h2>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables a hook that runs exception handlers
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableExceptionHook On|Off</code></td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableExceptionHook Off</code></td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.49 and later</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>For safety reasons this directive is only available if the server was
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding configured with the <code>--enable-exception-hook</code> option. It
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding enables a hook that allows external modules to plug in and do something
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding after a child crashed.</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>There are already two modules, <code>mod_whatkilledus</code> and
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <code>mod_backtrace</code> that make use of this hook. Please have a
ca53a74f4012a45cbad48e940eddf27d866981f9dougm look at Jeff Trawick's <a href="http://www.apache.org/~trawick/exception_hook.html">EnableExceptionHook site</a> for more information about these.</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<div class="directive-section"><h2><a name="GracefulShutdownTimeout" id="GracefulShutdownTimeout">GracefulShutdownTimeout</a> <a name="gracefulshutdowntimeout" id="gracefulshutdowntimeout">Directive</a></h2>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specify a timeout after which a gracefully shutdown server
ca53a74f4012a45cbad48e940eddf27d866981f9dougm<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>GracefulShutDownTimeout <var>seconds</var></code></td></tr>
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>GracefulShutDownTimeout 0</code></td></tr>
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/event.html">event</a></code></td></tr>
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.2 and later</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>The <code class="directive">GracefulShutdownTimeout</code> specifies
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding how many seconds after receiving a "graceful-stop" signal, a
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm server should continue to run, handling the existing connections.</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>Setting this value to zero means that the server will wait
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm indefinitely until all remaining requests have been fully served.</p>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<div class="directive-section"><h2><a name="Listen" id="Listen">Listen</a> <a name="listen" id="listen">Directive</a></h2>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>IP addresses and ports that the server
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Listen [<var>IP-address</var>:]<var>portnumber</var> [<var>protocol</var>]</code></td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/event.html">event</a></code></td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Required directive since Apache 2.0<br />
0f081398cf0eef8cc7c66a535d450110a92dc8aefieldingThe <var>protocol</var> argument was added in 2.1.5</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>The <code class="directive">Listen</code> directive instructs Apache to
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding listen to only specific IP addresses or ports; by default it
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding responds to requests on all IP interfaces. <code class="directive">Listen</code>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding is now a required directive. If it is not in the config file, the
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding server will fail to start. This is a change from previous versions
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding of Apache.</p>
8f3ec4772d2aeb347cf40e87c77627bb784dd018rbb <p>The <code class="directive">Listen</code> directive tells the server to
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding accept incoming requests on the specified port or address-and-port
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding combination. If only a port number is specified, the server listens to
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding the given port on all interfaces. If an IP address is given as well
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding as a port, the server will listen on the given port and
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding interface.</p>
85bea52867bd1a8c81080ba415b5cd5b771ce5f7gstein <p>Multiple <code class="directive">Listen</code> directives may be used to
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding specify a number of addresses and ports to listen to. The server will
d9f2c22804bcbc9ad07d4ec18fbb8aa7c042dcd0bjh respond to requests from any of the listed addresses and ports.</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>For example, to make the server accept connections on both
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding port 80 and port 8000, use:</p>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm Listen 80<br />
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Listen 8000
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>To make the server accept connections on two specified
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding interfaces and port numbers, use </p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Listen 192.170.2.1:80<br />
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Listen 192.170.2.5:8000
10a4cdd68ef1ca0e54af296fe1d08ac00150c90bwrowe <p>IPv6 addresses must be surrounded in square brackets, as in the
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding following example:</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Listen [2001:db8::a00:20ff:fea7:ccea]:80
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>The optional <var>protocol</var> argument is not required for most
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding configurations. If not specified, <code>https</code> is the default for
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding port 443 and <code>http</code> the default for all other ports. The
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding protocol is used to determine which module should handle a request, and
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding to apply protocol specific optimizations with the
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <code class="directive"><a href="/mod/core.html#acceptfilter">AcceptFilter</a></code> directive.</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <p>You only need to set the protocol if you are running on non-standard
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding ports. For example, running an <code>https</code> site on port 8443:</p>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Listen 192.170.2.1:8443 https
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Multiple <code class="directive">Listen</code> directives for the same ip
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding address and port will result in an <code>Address already in use</code>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding error message.
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<li><a href="/bind.html">Setting which addresses and ports Apache
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<li><a href="http://wiki.apache.org/httpd/CouldNotBindToAddress">Further
0f081398cf0eef8cc7c66a535d450110a92dc8aefieldingdiscussion of the <code>Address already in use</code> error message,
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben<div class="directive-section"><h2><a name="ListenBackLog" id="ListenBackLog">ListenBackLog</a> <a name="listenbacklog" id="listenbacklog">Directive</a></h2>
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum length of the queue of pending connections</td></tr>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ListenBacklog <var>backlog</var></code></td></tr>
3d96ee83babeec32482c9082c9426340cee8c44dwrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ListenBacklog 511</code></td></tr>
fd0edaa8e3d4dd67d0604ccef2e96b071db96643fielding<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
fd0edaa8e3d4dd67d0604ccef2e96b071db96643fielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
fd0edaa8e3d4dd67d0604ccef2e96b071db96643fielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
fd0edaa8e3d4dd67d0604ccef2e96b071db96643fielding <p>The maximum length of the queue of pending connections.
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm Generally no tuning is needed or desired, however on some
e95f5a6ebefb83d0e8a82cbc4db7d354957a817dben systems it is desirable to increase this when under a TCP SYN
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding flood attack. See the backlog parameter to the
<div class="directive-section"><h2><a name="MaxClients" id="MaxClients">MaxClients</a> <a name="maxclients" id="maxclients">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of connections that will be processed
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxClients <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for details</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<p>For non-threaded servers (<em>i.e.</em>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>),
<p>For threaded and hybrid servers (<em>e.g.</em> <code class="module"><a href="/mod/event.html">event</a></code>
or <code class="module"><a href="/mod/worker.html">worker</a></code>) <code class="directive">MaxClients</code> restricts
For hybrid MPMs the default value is <code>16</code> (<code class="directive"><a href="#serverlimit">ServerLimit</a></code>) multiplied by the value of
<code>25</code> (<code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>). Therefore, to increase <code class="directive">MaxClients</code> to a value that requires more than 16 processes,
<div class="directive-section"><h2><a name="MaxMemFree" id="MaxMemFree">MaxMemFree</a> <a name="maxmemfree" id="maxmemfree">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum amount of memory that the main allocator is allowed
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxMemFree <var>KBytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxMemFree 0</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code></td></tr>
<div class="directive-section"><h2><a name="MaxRequestsPerChild" id="MaxRequestsPerChild">MaxRequestsPerChild</a> <a name="maxrequestsperchild" id="maxrequestsperchild">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limit on the number of requests that an individual child server
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRequestsPerChild <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRequestsPerChild 10000</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<p>The default value for <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code> and
<p>For <code class="directive"><a href="/mod/core.html#keepalive">KeepAlive</a></code> requests, only
<div class="directive-section"><h2><a name="MaxSpareThreads" id="MaxSpareThreads">MaxSpareThreads</a> <a name="maxsparethreads" id="maxsparethreads">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of idle threads</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxSpareThreads <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for details</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> the default value is <code>10</code>.</p>
<li><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code> wants the value to be greater than
<li>For <code class="module"><a href="/mod/worker.html">worker</a></code>, the value must be greater or equal
<li><code class="directive"><a href="/mod/prefork.html#maxspareservers">MaxSpareServers</a></code></li>
<div class="directive-section"><h2><a name="MinSpareThreads" id="MinSpareThreads">MinSpareThreads</a> <a name="minsparethreads" id="minsparethreads">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Minimum number of idle threads available to handle request
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MinSpareThreads <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for details</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<p><code class="module"><a href="/mod/worker.html">worker</a></code> uses a default of <code>MinSpareThreads
<code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> the default value is <code>5</code>.</p>
<li><code class="directive"><a href="/mod/prefork.html#minspareservers">MinSpareServers</a></code></li>
<div class="directive-section"><h2><a name="PidFile" id="PidFile">PidFile</a> <a name="pidfile" id="pidfile">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File where the server records the process ID
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>PidFile <var>filename</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>PidFile logs/httpd.pid</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
so that it closes and then re-opens its <code class="directive"><a href="/mod/core.html#errorlog">ErrorLog</a></code> and <code class="directive"><a href="/mod/mod_log_config.html#transferlog">TransferLog</a></code>, and
warnings about log file placement and <a href="/misc/security_tips.html#serverroot">security</a>.</p>
<p>As of Apache 2, we recommended that you only use the <code class="program"><a href="/programs/apachectl.html">apachectl</a></code> script, or the init script that your OS provides,
<div class="directive-section"><h2><a name="ReceiveBufferSize" id="ReceiveBufferSize">ReceiveBufferSize</a> <a name="receivebuffersize" id="receivebuffersize">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>TCP receive buffer size</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ReceiveBufferSize <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ReceiveBufferSize 0</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<div class="directive-section"><h2><a name="ScoreBoardFile" id="ScoreBoardFile">ScoreBoardFile</a> <a name="scoreboardfile" id="scoreboardfile">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location of the file used to store coordination data for
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScoreBoardFile <var>file-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScoreBoardFile logs/apache_status</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<div class="directive-section"><h2><a name="SendBufferSize" id="SendBufferSize">SendBufferSize</a> <a name="sendbuffersize" id="sendbuffersize">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>TCP buffer size</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SendBufferSize <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SendBufferSize 0</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<div class="directive-section"><h2><a name="ServerLimit" id="ServerLimit">ServerLimit</a> <a name="serverlimit" id="serverlimit">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Upper limit on configurable number of processes</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerLimit <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for details</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<p>For the <code class="module"><a href="/mod/prefork.html">prefork</a></code> MPM, this directive sets the
maximum configured value for <code class="directive"><a href="#maxclients">MaxClients</a></code> for the lifetime of the
Apache process. For the <code class="module"><a href="/mod/worker.html">worker</a></code> MPM, this directive
the maximum configured value for <code class="directive"><a href="#maxclients">MaxClients</a></code> for the lifetime of the
restart will be ignored, but <code class="directive"><a href="#maxclients">MaxClients</a></code> can be modified during
both <code class="directive">ServerLimit</code> and <code class="directive"><a href="#maxclients">MaxClients</a></code> are set to values
<p>With the <code class="module"><a href="/mod/prefork.html">prefork</a></code> MPM, use this directive only
if you need to set <code class="directive"><a href="#maxclients">MaxClients</a></code> higher than 256 (default).
processes required by what you may want for <code class="directive"><a href="#maxclients ">MaxClients </a></code> and <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>.</p>
into the server (for the <code class="module"><a href="/mod/prefork.html">prefork</a></code> MPM 200000). This is
<div class="directive-section"><h2><a name="StartServers" id="StartServers">StartServers</a> <a name="startservers" id="startservers">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of child server processes created at startup</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>StartServers <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for details</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<p>The default value differs from MPM to MPM. <code class="module"><a href="/mod/worker.html">worker</a></code>
defaults to <code>StartServers 3</code>; <code class="module"><a href="/mod/prefork.html">prefork</a></code>
defaults to <code>5</code>; <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> defaults to
<div class="directive-section"><h2><a name="StartThreads" id="StartThreads">StartThreads</a> <a name="startthreads" id="startthreads">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of threads created on startup</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>StartThreads <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for details</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code></td></tr>
<div class="directive-section"><h2><a name="ThreadLimit" id="ThreadLimit">ThreadLimit</a> <a name="threadlimit" id="threadlimit">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the upper limit on the configurable number of threads
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ThreadLimit <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for details</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available for <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code> in Apache 2.0.41
<p>This directive sets the maximum configured value for <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code> for the lifetime
during a restart will be ignored, but <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code> can be modified
<code class="directive">ThreadLimit</code> and <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code> are set to values
any higher than your greatest predicted setting of <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code> for the
<code>1920</code> when used with <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code> and
<code>ThreadLimit 15000</code> with <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>)
<div class="directive-section"><h2><a name="ThreadsPerChild" id="ThreadsPerChild">ThreadsPerChild</a> <a name="threadsperchild" id="threadsperchild">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of threads created by each child process</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ThreadsPerChild <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for details</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
never creates more. If using an MPM like <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>,
like <code class="module"><a href="/mod/worker.html">worker</a></code>, where there are multiple child processes,
<code>64</code> when used with <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code> and
<div class="directive-section"><h2><a name="ThreadStackSize" id="ThreadStackSize">ThreadStackSize</a> <a name="threadstacksize" id="threadstacksize">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The size in bytes of the stack used by threads handling
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ThreadStackSize <var>size</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>65536 on NetWare; varies on other operating systems</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1 and later</td></tr>
(e.g., HP-UX), Apache may crash when using some third-party modules
<p><span>Available Languages: </span><a href="/de/mod/mpm_common.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<a href="/ja/mod/mpm_common.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="/tr/mod/mpm_common.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
<p class="apache">Copyright 2010 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>