mpm_common.html.en revision 2bc7f1cf720973a67f8ff7a8d523e40569ae5b6c
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4c1132f34493327abc632196f5876a89aa573687Bob Halley<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4c1132f34493327abc632196f5876a89aa573687Bob Halley XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4c1132f34493327abc632196f5876a89aa573687Bob Halley This file is generated from xml source: DO NOT EDIT
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
15a44745412679c30a6d022733925af70a38b715David Lawrence<title>mpm_common - Apache HTTP Server</title>
15a44745412679c30a6d022733925af70a38b715David Lawrence<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
15a44745412679c30a6d022733925af70a38b715David Lawrence<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
15a44745412679c30a6d022733925af70a38b715David Lawrence<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
15a44745412679c30a6d022733925af70a38b715David Lawrence<link href="/images/favicon.ico" rel="shortcut icon" /></head>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<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>
3d60fe9bafbf633e3a7811c11227baebb17878a4Brian Wellington<p class="apache">Apache HTTP Server Version 2.1</p>
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence<img alt="" src="/images/feather.gif" /></div>
f41f183f628a148860a6d1f0070208cddd45b0c6Bob Halley<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
f41f183f628a148860a6d1f0070208cddd45b0c6Bob Halley<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="../">Version 2.1</a> > <a href="./">Modules</a></div>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<div id="preamble"><h1>Apache MPM Common Directives</h1>
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley<p><span>Available Languages: </span><a href="/de/mod/mpm_common.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley<a href="/en/mod/mpm_common.html" title="English"> en </a> |
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley<a href="/ja/mod/mpm_common.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p>
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>A collection of directives that are implemented by
6d5dcd0dc9bdbd679282b1ffc47987d24c3a1346Bob Halleymore than one multi-processing module (MPM)</td></tr>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<tr><th><a href="module-dict.html#Status">Status:</a></th><td>MPM</td></tr></table>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<div id="quickview"><h3 class="directives">Directives</h3>
c45abd11bb68005d8a5c56c14b16f4184c3e057dMichael Graff<li><img alt="" src="/images/down.gif" /> <a href="#acceptmutex">AcceptMutex</a></li>
ab3f2d77bddef25a0af62d89894cb4964ee4f1d8Andreas Gustafsson<li><img alt="" src="/images/down.gif" /> <a href="#coredumpdirectory">CoreDumpDirectory</a></li>
ab3f2d77bddef25a0af62d89894cb4964ee4f1d8Andreas Gustafsson<li><img alt="" src="/images/down.gif" /> <a href="#enableexceptionhook">EnableExceptionHook</a></li>
ab3f2d77bddef25a0af62d89894cb4964ee4f1d8Andreas Gustafsson<li><img alt="" src="/images/down.gif" /> <a href="#gracefulshutdowntimeout">GracefulShutdownTimeout</a></li>
ab3f2d77bddef25a0af62d89894cb4964ee4f1d8Andreas Gustafsson<li><img alt="" src="/images/down.gif" /> <a href="#group">Group</a></li>
ab3f2d77bddef25a0af62d89894cb4964ee4f1d8Andreas Gustafsson<li><img alt="" src="/images/down.gif" /> <a href="#listen">Listen</a></li>
a685d9c3b608eb768d237f20e8e8b1c5d3902146David Lawrence<li><img alt="" src="/images/down.gif" /> <a href="#listenbacklog">ListenBackLog</a></li>
feb08cecf318bba330437cfcb725f48d999804d8James Brister<li><img alt="" src="/images/down.gif" /> <a href="#lockfile">LockFile</a></li>
c6d0fc864de5153699688ffd28ef8a286b986354James Brister<li><img alt="" src="/images/down.gif" /> <a href="#maxclients">MaxClients</a></li>
feb08cecf318bba330437cfcb725f48d999804d8James Brister<li><img alt="" src="/images/down.gif" /> <a href="#maxmemfree">MaxMemFree</a></li>
feb08cecf318bba330437cfcb725f48d999804d8James Brister<li><img alt="" src="/images/down.gif" /> <a href="#maxrequestsperchild">MaxRequestsPerChild</a></li>
feb08cecf318bba330437cfcb725f48d999804d8James Brister<li><img alt="" src="/images/down.gif" /> <a href="#maxsparethreads">MaxSpareThreads</a></li>
9d794b52031144006ffb987ac8533a95c677c378Brian Wellington<li><img alt="" src="/images/down.gif" /> <a href="#minsparethreads">MinSpareThreads</a></li>
e49d50b4436d760c040dca81c8426ee806996d6bDavid Lawrence<li><img alt="" src="/images/down.gif" /> <a href="#pidfile">PidFile</a></li>
e49d50b4436d760c040dca81c8426ee806996d6bDavid Lawrence<li><img alt="" src="/images/down.gif" /> <a href="#receivebuffersize">ReceiveBufferSize</a></li>
e323a667e0324e6ac67a10c6fdd82a6a57097dc8James Brister<li><img alt="" src="/images/down.gif" /> <a href="#scoreboardfile">ScoreBoardFile</a></li>
feb08cecf318bba330437cfcb725f48d999804d8James Brister<li><img alt="" src="/images/down.gif" /> <a href="#sendbuffersize">SendBufferSize</a></li>
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington<li><img alt="" src="/images/down.gif" /> <a href="#serverlimit">ServerLimit</a></li>
698de4d4c0463cf0eb1cfd71e13387ee2cf8d7a5Brian Wellington<li><img alt="" src="/images/down.gif" /> <a href="#startservers">StartServers</a></li>
698de4d4c0463cf0eb1cfd71e13387ee2cf8d7a5Brian Wellington<li><img alt="" src="/images/down.gif" /> <a href="#startthreads">StartThreads</a></li>
d7483d67f7aa8f80d5f880aa4650f2bdb90d6623Brian Wellington<li><img alt="" src="/images/down.gif" /> <a href="#threadlimit">ThreadLimit</a></li>
5d0cca62ee6551a2af73e72ee53c05436b43520bBrian Wellington<li><img alt="" src="/images/down.gif" /> <a href="#threadsperchild">ThreadsPerChild</a></li>
3d60fe9bafbf633e3a7811c11227baebb17878a4Brian Wellington<li><img alt="" src="/images/down.gif" /> <a href="#threadstacksize">ThreadStackSize</a></li>
3d60fe9bafbf633e3a7811c11227baebb17878a4Brian Wellington<li><img alt="" src="/images/down.gif" /> <a href="#user">User</a></li>
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington<div class="directive-section"><h2><a name="AcceptMutex" id="AcceptMutex">AcceptMutex</a> <a name="acceptmutex" id="acceptmutex">Directive</a></h2>
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Method that Apache uses to serialize multiple children
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellingtonaccepting requests on network sockets</td></tr>
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptMutex Default|<var>method</var></code></td></tr>
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptMutex Default</code></td></tr>
15f7ee3c0b027d9a6a3e25e548215236326b3b04Brian Wellington<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
65c4736d9c0ebc6d9b1d991593b55566909da9cdBrian Wellington<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
65c4736d9c0ebc6d9b1d991593b55566909da9cdBrian Wellington<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
75e4800964642475632766068e8d99de3ea3e8f0Brian Wellington <p>The <code class="directive">AcceptMutex</code> directives sets the
75e4800964642475632766068e8d99de3ea3e8f0Brian Wellington method that Apache uses to serialize multiple children accepting
65c4736d9c0ebc6d9b1d991593b55566909da9cdBrian Wellington requests on network sockets. Prior to Apache 2.0, the method was
65c4736d9c0ebc6d9b1d991593b55566909da9cdBrian Wellington selectable only at compile time. The optimal method to use is
65c4736d9c0ebc6d9b1d991593b55566909da9cdBrian Wellington highly architecture and platform dependent. For further details,
75e4800964642475632766068e8d99de3ea3e8f0Brian Wellington see the <a href="/misc/perf-tuning.html">performance tuning</a>
75e4800964642475632766068e8d99de3ea3e8f0Brian Wellington documentation.</p>
65c4736d9c0ebc6d9b1d991593b55566909da9cdBrian Wellington <p>If this directive is set to <code>Default</code>, then the
15f7ee3c0b027d9a6a3e25e548215236326b3b04Brian Wellington compile-time selected default will be used. Other possible
15f7ee3c0b027d9a6a3e25e548215236326b3b04Brian Wellington methods are listed below. Note that not all methods are
15f7ee3c0b027d9a6a3e25e548215236326b3b04Brian Wellington available on all platforms. If a method is specified which is
d01c654984fd4f1a20cb4905548076afeba1c8c1Brian Wellington not available, a message will be written to the error log
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington listing the available methods.</p>
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington <dd>uses the <code>flock(2)</code> system call to lock the
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington file defined by the <code class="directive"><a href="#lockfile">LockFile</a></code> directive.</dd>
5af0b591fdbd8634e245ace452767d2fc328c05aBrian Wellington <dd>uses the <code>fcntl(2)</code> system call to lock the
d8e93e7f902b73108952891ced5b02e743c71f99Brian Wellington file defined by the <code class="directive"><a href="#lockfile">LockFile</a></code> directive.</dd>
850d70818503ca1b0f98c9c70b16b51e789fd705Andreas Gustafsson <dd>uses POSIX compatible semaphores to implement the mutex.</dd>
911ed0d3bee586b3bec42cb6c376d5cc6c0e1e24Brian Wellington <dd>uses POSIX mutexes as implemented by the POSIX Threads
911ed0d3bee586b3bec42cb6c376d5cc6c0e1e24Brian Wellington (PThreads) specification.</dd>
3cd88f71b01833d5c2474638854dfa5c4244a22aBrian Wellington <dd>uses SySV-style semaphores to implement the mutex.</dd>
ce1f5b8d0ae5936fd187c1f414ff12a7e3b0aa37Andreas Gustafsson <p>If you want to find out the compile time chosen default
850d70818503ca1b0f98c9c70b16b51e789fd705Andreas Gustafsson for your system, you may set your <code class="directive"><a href="/mod/core.html#loglevel">LogLevel</a></code> to <code>debug</code>. Then the default <code class="directive">AcceptMutex</code> will be written into the <code class="directive"><a href="/mod/core.html#errorlog">ErrorLog</a></code>.</p>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley <p>On most systems, when the <code>pthread</code> option
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence is selected, if a child process terminates abnormally
850d70818503ca1b0f98c9c70b16b51e789fd705Andreas Gustafsson while holding the <code>AcceptCntl</code> mutex the
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson server will stop responding to requests. When this
911ed0d3bee586b3bec42cb6c376d5cc6c0e1e24Brian Wellington occurs, the server will require a manual restart to
911ed0d3bee586b3bec42cb6c376d5cc6c0e1e24Brian Wellington <p>Solaris is a notable exception as it provides a
911ed0d3bee586b3bec42cb6c376d5cc6c0e1e24Brian Wellington mechanism, used by Apache, which usually allows the
ab3f2d77bddef25a0af62d89894cb4964ee4f1d8Andreas Gustafsson mutex to be recovered after a child process terminates
3cd88f71b01833d5c2474638854dfa5c4244a22aBrian Wellington abnormally while holding a mutex.</p>
3cd88f71b01833d5c2474638854dfa5c4244a22aBrian Wellington <p>If your system implements the
3cd88f71b01833d5c2474638854dfa5c4244a22aBrian Wellington <code>pthread_mutexattr_setrobust_np()</code> function,
ce1f5b8d0ae5936fd187c1f414ff12a7e3b0aa37Andreas Gustafsson you may be able to use the <code>pthread</code> option safely.</p>
feb08cecf318bba330437cfcb725f48d999804d8James Brister<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4fd3e3482c7e4ce01e2cf28f13e0152c8e50d746Mark Andrews<div class="directive-section"><h2><a name="CoreDumpDirectory" id="CoreDumpDirectory">CoreDumpDirectory</a> <a name="coredumpdirectory" id="coredumpdirectory">Directive</a></h2>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory where Apache attempts to
d2b5fe92a4755ce67f2dd6050955782b4fd6b3f3Mark Andrews<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CoreDumpDirectory <var>directory</var></code></td></tr>
d2b5fe92a4755ce67f2dd6050955782b4fd6b3f3Mark Andrews<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>See usage for the default setting</code></td></tr>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley <p>This controls the directory to which Apache attempts to
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley switch before dumping core. The default is in the
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley <code class="directive"><a href="/mod/core.html#serverroot">ServerRoot</a></code> directory, however
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley since this should not be writable by the user the server runs
139154bd9894495042f4e748f554e9c8b98b7598Bob Halley as, core dumps won't normally get written. If you want a core
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley dump for debugging, you can use this directive to place it in a
193738b819e3c699f9edd18864a6810fcfcec855Andreas Gustafsson different location.</p>
fd35453765c6494d077edca44f4d998af5fd4cfaDavid Lawrence <div class="note"><h3>Core Dumps on Linux</h3>
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley <p>If Apache starts as root and switches to another user, the
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley Linux kernel <em>disables</em> core dumps even if the directory is
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley writable for the process. Apache (2.0.46 and later) reenables core dumps
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley on Linux 2.4 and beyond, but only if you explicitly configure a <code class="directive">CoreDumpDirectory</code>.</p>
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<div class="directive-section"><h2><a name="EnableExceptionHook" id="EnableExceptionHook">EnableExceptionHook</a> <a name="enableexceptionhook" id="enableexceptionhook">Directive</a></h2>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables a hook that runs exception handlers
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableExceptionHook On|Off</code></td></tr>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableExceptionHook Off</code></td></tr>
a2f3208f7f754cbc5156a1d798ae06d8f3546be2Bob Halley<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
4880900113e4d0f17884f3fbdbf4c302e3f9ea91Bob Halley<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
fd35453765c6494d077edca44f4d998af5fd4cfaDavid Lawrence<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.49 and later</td></tr>
4fd3e3482c7e4ce01e2cf28f13e0152c8e50d746Mark Andrews <p>For safety reasons this directive is only available if the server was
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews configured with the <code>--enable-exception-hook</code> option. It
6ef838d427c1ea858d2f09194a369134babf8b98Mark Andrews enables a hook that allows external modules to plug in and do something
6ef838d427c1ea858d2f09194a369134babf8b98Mark Andrews after a child crashed.</p>
6ef838d427c1ea858d2f09194a369134babf8b98Mark Andrews <p>There are already two modules, <code>mod_whatkilledus</code> and
6d831cd0baf7dd2c133f7f9cbf295f3d80cf63a7David Lawrence <code>mod_backtrace</code> that make use of this hook. Please have a
6d831cd0baf7dd2c133f7f9cbf295f3d80cf63a7David Lawrence look at Jeff Trawick's <a href="http://www.apache.org/~trawick/exception_hook.html">EnableExceptionHook site</a> for more information about these.</p>
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6d7585b3e948dd31bf78321d83ac0e024f44a71bMark Andrews<div class="directive-section"><h2><a name="GracefulShutdownTimeout" id="GracefulShutdownTimeout">GracefulShutdownTimeout</a> <a name="gracefulshutdowntimeout" id="gracefulshutdowntimeout">Directive</a></h2>
6d7585b3e948dd31bf78321d83ac0e024f44a71bMark Andrews<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specify a timeout after which a gracefully shutdown server
6d5dcd0dc9bdbd679282b1ffc47987d24c3a1346Bob Halley<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>GracefulShutDownTimeout <var>seconds</var></code></td></tr>
6d7585b3e948dd31bf78321d83ac0e024f44a71bMark Andrews<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>GracefulShutDownTimeout 0</code></td></tr>
1471a520e59ac12b413afa8d8b3158a87af97aa6Bob Halley<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1471a520e59ac12b413afa8d8b3158a87af97aa6Bob Halley<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
1471a520e59ac12b413afa8d8b3158a87af97aa6Bob Halley<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>
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.2 and later</td></tr>
1471a520e59ac12b413afa8d8b3158a87af97aa6Bob Halley <p>The <code class="directive">GracefulShutdownTimeout</code> specifies
4fd3e3482c7e4ce01e2cf28f13e0152c8e50d746Mark Andrews how many seconds after receiving a "graceful-stop" signal, a
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews server should continue to run, handling the existing connections.</p>
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews <p>Setting this value to zero means that the server will wait
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews indefinitely until all remaining requests have been fully served.</p>
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1471a520e59ac12b413afa8d8b3158a87af97aa6Bob Halley<div class="directive-section"><h2><a name="Group" id="Group">Group</a> <a name="group" id="group">Directive</a></h2>
1471a520e59ac12b413afa8d8b3158a87af97aa6Bob Halley<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Group under which the server will answer
1471a520e59ac12b413afa8d8b3158a87af97aa6Bob Halley<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Group <var>unix-group</var></code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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>Only valid in global server config since Apache
<p>Don't set <code class="directive">Group</code> (or <code class="directive"><a href="#user">User</a></code>) to <code>root</code> unless
<p>Special note: Use of this directive in <code class="directive"><a href="/mod/core.html#virtualhost"><VirtualHost></a></code> is no longer supported. To
configure your server for <code class="program"><a href="/programs/suexec.html">suexec</a></code> use
<code class="directive"><a href="/mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code>.</p>
in the <code class="module"><a href="/mod/beos.html">beos</a></code> and <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> MPMs,
<div class="directive-section"><h2><a name="Listen" id="Listen">Listen</a> <a name="listen" id="listen">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>IP addresses and ports that the server
<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>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Required directive since Apache 2.0<br />
<code class="directive"><a href="/mod/core.html#acceptfilter">AcceptFilter</a></code> directive.</p>
<div class="directive-section"><h2><a name="ListenBackLog" id="ListenBackLog">ListenBackLog</a> <a name="listenbacklog" id="listenbacklog">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum length of the queue of pending connections</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ListenBacklog <var>backlog</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ListenBacklog 511</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<div class="directive-section"><h2><a name="LockFile" id="LockFile">LockFile</a> <a name="lockfile" id="lockfile">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location of the accept serialization lock file</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LockFile <var>filename</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LockFile logs/accept.lock</code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
the lockfile used when Apache is used with an <code class="directive"><a href="#acceptmutex">AcceptMutex</a></code> value of either
<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 child processes that will be created
<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/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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/beos.html">beos</a></code>
or <code class="module"><a href="/mod/worker.html">worker</a></code>) <code class="directive">MaxClients</code> restricts
The default value for <code class="module"><a href="/mod/beos.html">beos</a></code> is <code>50</code>. 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/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <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/threadpool.html">threadpool</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/leader.html">leader</a></code>, <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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<p>For <code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code> and <code class="module"><a href="/mod/threadpool.html">threadpool</a></code> the default is <code>MaxSpareThreads 250</code>.
<p><code class="module"><a href="/mod/beos.html">beos</a></code> and <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> work
similar to <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>. The default for
<code class="module"><a href="/mod/beos.html">beos</a></code> is <code>MaxSpareThreads 50</code>. For
<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/perchild.html">perchild</a></code> requires <code class="directive">MaxSpareThreads</code> to be less or equal than <code class="directive"><a href="#threadlimit">ThreadLimit</a></code>.</li>
<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/leader.html">leader</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code> and
<code class="module"><a href="/mod/worker.html">worker</a></code> the value must be greater or equal than
<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/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
that child. Thus, if you set <code class="directive"><a href="/mod/perchild.html#numservers">NumServers</a></code> to <code>10</code> and a <code class="directive">MinSpareThreads</code> value of <code>5</code>, you'll have
<p><code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code> and
<code class="module"><a href="/mod/threadpool.html">threadpool</a></code> use a default of <code>MinSpareThreads
<p><code class="module"><a href="/mod/beos.html">beos</a></code> and <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> work
similar to <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>. The default for
<code class="module"><a href="/mod/beos.html">beos</a></code> is <code>MinSpareThreads 1</code>. For
<code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> the default value is <code>5</code>.</p>
<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/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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 it is recommended to use only the <code class="program"><a href="/programs/apachectl.html">apachectl</a></code> script for (re-)starting or stopping the server.</p>
<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/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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/leader.html">leader</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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).
<p>With <code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code> and
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>
<p>With the <code class="module"><a href="/mod/perchild.html">perchild</a></code> MPM, use this directive only
if you need to set <code class="directive"><a href="/mod/perchild.html#numservers">NumServers</a></code> higher than 8 (default).</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/leader.html">leader</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/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
<code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code> and
<code class="module"><a href="/mod/worker.html">worker</a></code> the default is <code>StartServers 3</code>.
For <code class="module"><a href="/mod/prefork.html">prefork</a></code> defaults to <code>5</code> and for
<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/beos.html">beos</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code></td></tr>
<p>For <code class="module"><a href="/mod/perchild.html">perchild</a></code> the default is <code>StartThreads
<p>For <code class="module"><a href="/mod/beos.html">beos</a></code> the default is <code>StartThreads
<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/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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/leader.html">leader</a></code>, <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/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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
<div class="directive-section"><h2><a name="User" id="User">User</a> <a name="user" id="user">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The userid under which the server will answer
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>User <var>unix-userid</var></code></td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</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>Only valid in global server config since Apache
<p>Don't set <code class="directive">User</code> (or <code class="directive"><a href="#group">Group</a></code>) to <code>root</code> unless
<p>With the <code class="module"><a href="/mod/perchild.html">perchild</a></code> MPM, which is intended to
main server and the fallback for <code class="directive"><a href="/mod/core.html#virtualhost"><VirtualHost></a></code> sections without an
<code class="directive"><a href="/mod/perchild.html#assignuserid">AssignUserID</a></code> directive.</p>
<p>Special note: Use of this directive in <code class="directive"><a href="/mod/core.html#virtualhost"><VirtualHost></a></code> is no longer supported. To
configure your server for <code class="program"><a href="/programs/suexec.html">suexec</a></code> use
<code class="directive"><a href="/mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code>.</p>
in the <code class="module"><a href="/mod/beos.html">beos</a></code> and <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> MPMs,
<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></p>
<p class="apache">Copyright 1995-2005 The Apache Software Foundation or its licensors, as applicable.<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>