.el .ne 3
.IP "\\$1" \\$2
..
-.TH "ROTATELOGS" 8 "2010-12-27" "Apache HTTP Server" "rotatelogs"
+.TH "ROTATELOGS" 8 "2011-06-22" "Apache HTTP Server" "rotatelogs"
.SH NAME
rotatelogs \- Piped logging program to rotate Apache logs
.SH "SYNOPSIS"
.PP
-\fBrotatelogs\fR [ -\fBl\fR ] [ -\fBL\fR \fIlinkname\fR ] [ -\fBf\fR ] [ -\fBv\fR ] [ -\fBe\fR ] \fIlogfile\fR \fIrotationtime\fR|\fIfilesize\fR(B|K|M|G) [ \fIoffset\fR ]
+\fBrotatelogs\fR [ -\fBl\fR ] [ -\fBL\fR \fIlinkname\fR ] [ -\fBp\fR \fIprogram\fR ] [ -\fBf\fR ] [ -\fBv\fR ] [ -\fBe\fR ] \fIlogfile\fR \fIrotationtime\fR|\fIfilesize\fR(B|K|M|G) [ \fIoffset\fR ]
.SH "SUMMARY"
-L \fIlinkname\fR
Causes a hard link to be made from the current logfile to the specified link name\&. This can be used to watch the log continuously across rotations using a command like tail -F linkname\&.
.TP
+-p \fIprogram\fR
+Causes the specified program to be executed after each rotation\&. Two arguments are supplied upon execution: the newly opened file and the previous file, respectively\&. rotatelogs does not wait for the specified program to terminate before continuing to operate, and will not log any error code returned on termination\&. The spawned program uses the same stdin, stdout, and stderr as rotatelogs itself, and also inherits the environment\&.
+.TP
-f
Causes the logfile to be opened immediately, as soon as rotatelogs starts, instead of waiting for the first logfile entry to be read (for non-busy sites, there may be a substantial delay between when the server is started and when the first request is handled, meaning that the associated logfile does not "exist" until then, which causes problems from some automated logging tools)
.TP
luaquickhandler mod/mod_lua.html#luaquickhandler
luaroot mod/mod_lua.html#luaroot
luascope mod/mod_lua.html#luascope
-maxclients mod/mpm_common.html#maxclients
maxconnectionsperchild mod/mpm_common.html#maxconnectionsperchild
maxkeepaliverequests mod/core.html#maxkeepaliverequests
maxmemfree mod/mpm_common.html#maxmemfree
+maxrequestworkers mod/mpm_common.html#maxrequestworkers
maxspareservers mod/prefork.html#maxspareservers
maxsparethreads mod/mpm_common.html#maxsparethreads
maxthreads mod/mpm_netware.html#maxthreads
as swapping increases the latency of each request beyond a point
that users consider "fast enough". This causes users to hit
stop and reload, further increasing the load. You can, and
- should, control the <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code> setting so that your server
+ should, control the <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code> setting so that your server
does not spawn so many children it starts swapping. This procedure
for doing this is simple: determine the size of your average Apache
process, by looking at your process list via a tool such as
system. This is active by default in Apache httpd, but may
require reconfiguration of your kernel.</li>
- <li>Tune the <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code> directive to allow
+ <li>Tune the <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code> directive to allow
the server to handle the maximum number of simultaneous
connections without running out of resources. See also the <a href="perf-tuning.html">performance tuning
documentation</a>.</li>
<td>Process ID of current process</td></tr>
<tr><td><code>%...T</code></td>
<td>Thread ID of current thread</td></tr>
-<tr class="odd"><td><code>%...t</code></td>
+<tr class="odd"><td><code>%...{g}T</code></td>
+ <td>System unique thread ID of current thread (the same ID as
+ displayed by e.g. <code>top</code>; currently Linux only)</td></tr>
+<tr><td><code>%...t</code></td>
<td>The current time</td></tr>
-<tr><td><code>%...{u}t</code></td>
+<tr class="odd"><td><code>%...{u}t</code></td>
<td>The current time including micro-seconds</td></tr>
-<tr class="odd"><td><code>%...{cu}t</code></td>
+<tr><td><code>%...{cu}t</code></td>
<td>The current time in compact ISO 8601 format, including
micro-seconds</td></tr>
-<tr><td><code>%...v</code></td>
+<tr class="odd"><td><code>%...v</code></td>
<td>The canonical <code class="directive"><a href="#servername">ServerName</a></code>
of the current server.</td></tr>
-<tr class="odd"><td><code>%...V</code></td>
+<tr><td><code>%...V</code></td>
<td>The server name of the server serving the request according to the
<code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>
setting.</td></tr>
-<tr><td><code>\ </code> (backslash space)</td>
+<tr class="odd"><td><code>\ </code> (backslash space)</td>
<td>Non-field delimiting space</td></tr>
-<tr class="odd"><td><code>% </code> (percent space)</td>
+<tr><td><code>% </code> (percent space)</td>
<td>Field delimiter (no output)</td></tr>
</table>
<li><a href="mod_lua.html#luaquickhandler">LuaQuickHandler</a></li>
<li><a href="mod_lua.html#luaroot">LuaRoot</a></li>
<li><a href="mod_lua.html#luascope">LuaScope</a></li>
-<li><a href="mpm_common.html#maxclients" id="M" name="M">MaxClients</a></li>
-<li><a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
+<li><a href="mpm_common.html#maxconnectionsperchild" id="M" name="M">MaxConnectionsPerChild</a></li>
<li><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
<li><a href="mpm_common.html#maxmemfree">MaxMemFree</a></li>
+<li><a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></li>
<li><a href="prefork.html#maxspareservers">MaxSpareServers</a></li>
<li><a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li>
<li><a href="mpm_netware.html#maxthreads">MaxThreads</a></li>
<li><a href="mod_lua.html#luaquickhandler">LuaQuickHandler</a></li>
<li><a href="mod_lua.html#luaroot">LuaRoot</a></li>
<li><a href="mod_lua.html#luascope">LuaScope</a></li>
-<li><a href="mpm_common.html#maxclients" id="M" name="M">MaxClients</a></li>
-<li><a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
+<li><a href="mpm_common.html#maxconnectionsperchild" id="M" name="M">MaxConnectionsPerChild</a></li>
<li><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
<li><a href="mpm_common.html#maxmemfree">MaxMemFree</a></li>
+<li><a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></li>
<li><a href="prefork.html#maxspareservers">MaxSpareServers</a></li>
<li><a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li>
<li><a href="mpm_netware.html#maxthreads">MaxThreads</a></li>
<li><a href="mod_lua.html#luaquickhandler">LuaQuickHandler</a></li>
<li><a href="mod_lua.html#luaroot">LuaRoot</a></li>
<li><a href="mod_lua.html#luascope">LuaScope</a></li>
-<li><a href="mpm_common.html#maxclients" id="M" name="M">MaxClients</a></li>
-<li><a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
+<li><a href="mpm_common.html#maxconnectionsperchild" id="M" name="M">MaxConnectionsPerChild</a></li>
<li><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
<li><a href="mpm_common.html#maxmemfree">MaxMemFree</a></li>
+<li><a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></li>
<li><a href="prefork.html#maxspareservers">MaxSpareServers</a></li>
<li><a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li>
<li><a href="mpm_netware.html#maxthreads">MaxThreads</a></li>
<li><a href="mod_lua.html#luaquickhandler">LuaQuickHandler</a></li>
<li><a href="mod_lua.html#luaroot">LuaRoot</a></li>
<li><a href="mod_lua.html#luascope">LuaScope</a></li>
-<li><a href="mpm_common.html#maxclients" id="M" name="M">MaxClients</a></li>
-<li><a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
+<li><a href="mpm_common.html#maxconnectionsperchild" id="M" name="M">MaxConnectionsPerChild</a></li>
<li><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
<li><a href="mpm_common.html#maxmemfree">MaxMemFree</a></li>
+<li><a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></li>
<li><a href="prefork.html#maxspareservers">MaxSpareServers</a></li>
<li><a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li>
<li><a href="mpm_netware.html#maxthreads">MaxThreads</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#group">Group</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listen">Listen</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listenbacklog">ListenBacklog</a></li>
-<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxclients">MaxClients</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxmemfree">MaxMemFree</a></li>
+<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#minsparethreads">MinSpareThreads</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#pidfile">PidFile</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#group">Group</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listen">Listen</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listenbacklog">ListenBacklog</a></li>
-<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxclients">MaxClients</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxmemfree">MaxMemFree</a></li>
+<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#minsparethreads">MinSpareThreads</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#pidfile">PidFile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#gracefulshutdowntimeout">GracefulShutdownTimeout</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#listen">Listen</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#listenbacklog">ListenBackLog</a></li>
-<li><img alt="" src="../images/down.gif" /> <a href="#maxclients">MaxClients</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxmemfree">MaxMemFree</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#maxrequestworkers">MaxRequestWorkers</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxsparethreads">MaxSpareThreads</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#minsparethreads">MinSpareThreads</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#pidfile">PidFile</a></li>
but use a number based on (but normally larger than) what is
set.</p>
-</div>
-<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
-<div class="directive-section"><h2><a name="MaxClients" id="MaxClients">MaxClients</a> <a name="maxclients" id="maxclients">Directive</a></h2>
-<table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of connections that will be processed
-simultaneously</td></tr>
-<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#Context">Context:</a></th><td>server config</td></tr>
-<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
-<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="../mod/event.html">event</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>
-</table>
- <p>The <code class="directive">MaxClients</code> directive sets the limit
- on the number of simultaneous requests that will be served. Any
- connection attempts over the <code class="directive">MaxClients</code>
- limit will normally be queued, up to a number based on the
- <code class="directive"><a href="#listenbacklog">ListenBacklog</a></code>
- directive. Once a child process is freed at the end of a different
- request, the connection will then be serviced.</p>
-
- <p>For non-threaded servers (<em>i.e.</em>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>),
- <code class="directive">MaxClients</code> translates into the maximum
- number of child processes that will be launched to serve requests.
- The default value is <code>256</code>; to increase it, you must also raise
- <code class="directive"><a href="#serverlimit">ServerLimit</a></code>.</p>
-
- <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
- the total number of threads that will be available to serve clients.
- 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,
- you must also raise <code class="directive"><a href="#serverlimit">ServerLimit</a></code>.</p>
-
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MaxConnectionsPerChild" id="MaxConnectionsPerChild">MaxConnectionsPerChild</a> <a name="maxconnectionsperchild" id="maxconnectionsperchild">Directive</a></h2>
to hold without calling <code>free()</code>. When not set, or when set
to zero, the threshold will be set to unlimited.</p>
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="MaxRequestWorkers" id="MaxRequestWorkers">MaxRequestWorkers</a> <a name="maxrequestworkers" id="maxrequestworkers">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of connections that will be processed
+simultaneously</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRequestWorkers <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#Context">Context:</a></th><td>server config</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>MPM</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="../mod/event.html">event</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>
+</table>
+ <p>The <code class="directive">MaxRequestWorkers</code> directive sets the limit
+ on the number of simultaneous requests that will be served. Any
+ connection attempts over the <code class="directive">MaxRequestWorkers</code>
+ limit will normally be queued, up to a number based on the
+ <code class="directive"><a href="#listenbacklog">ListenBacklog</a></code>
+ directive. Once a child process is freed at the end of a different
+ request, the connection will then be serviced.</p>
+
+ <p>For non-threaded servers (<em>i.e.</em>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>),
+ <code class="directive">MaxRequestWorkers</code> translates into the maximum
+ number of child processes that will be launched to serve requests.
+ The default value is <code>256</code>; to increase it, you must also raise
+ <code class="directive"><a href="#serverlimit">ServerLimit</a></code>.</p>
+
+ <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">MaxRequestWorkers</code> restricts
+ the total number of threads that will be available to serve clients.
+ 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">MaxRequestWorkers</code> to a value that requires more than 16 processes,
+ you must also raise <code class="directive"><a href="#serverlimit">ServerLimit</a></code>.</p>
+
+ <p><code class="directive">MaxRequestWorkers</code> was called
+ <code class="directive">MaxClients</code> before version 2.3.13. The old name ist still
+ supported.</p>
+
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<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#Module">Module:</a></th><td><code class="module"><a href="../mod/event.html">event</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>
</table>
<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
+ maximum configured value for <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code> for the lifetime of the
Apache httpd process. For the <code class="module"><a href="../mod/worker.html">worker</a></code> MPM, this directive
in combination with <code class="directive"><a href="#threadlimit">ThreadLimit</a></code> sets
- the maximum configured value for <code class="directive"><a href="#maxclients">MaxClients</a></code> for the lifetime of the
+ the maximum configured value for <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code> for the lifetime of the
Apache httpd process. Any attempts to change this directive during a
- restart will be ignored, but <code class="directive"><a href="#maxclients">MaxClients</a></code> can be modified during
+ restart will be ignored, but <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code> can be modified during
a restart.</p>
<p>Special care must be taken when using this directive. If
<code class="directive">ServerLimit</code> is set to a value much higher
than necessary, extra, unused shared memory will be allocated. If
- both <code class="directive">ServerLimit</code> and <code class="directive"><a href="#maxclients">MaxClients</a></code> are set to values
+ both <code class="directive">ServerLimit</code> and <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code> are set to values
higher than the system can handle, Apache httpd may not start or the
system may become unstable.</p>
<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).
+ if you need to set <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code> higher than 256 (default).
Do not set the value of this directive any higher than what you
- might want to set <code class="directive"><a href="#maxclients">MaxClients</a></code> to.</p>
+ might want to set <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code> to.</p>
<p>With <code class="module"><a href="../mod/worker.html">worker</a></code>, use this directive only
- if your <code class="directive"><a href="#maxclients">MaxClients</a></code> and
+ if your <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code> and
<code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
settings require more than 16 server processes (default). Do not set
the value of this directive any higher than the number of server
- 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>
+ processes required by what you may want for <code class="directive"><a href="#maxrequestworkers ">MaxRequestWorkers </a></code> and <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>.</p>
<div class="note"><h3>Note</h3>
<p>There is a hard limit of <code>ServerLimit 20000</code> compiled
<p>This MPM is very self-regulating, so it is rarely necessary to
adjust its configuration directives. Most important is that
- <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code> be big enough to
- handle as many simultaneous requests as you expect to receive, but
+ <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code> be big enough
+ to handle as many simultaneous requests as you expect to receive, but
small enough to assure that there is enough physical RAM for all
processes.</p>
</div>
<li><img alt="" src="../images/right.gif" /> <a href="mod_unixd.html#group">Group</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listen">Listen</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listenbacklog">ListenBacklog</a></li>
-<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxclients">MaxClients</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxmemfree">MaxMemFree</a></li>
+<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxspareservers">MaxSpareServers</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#minspareservers">MinSpareServers</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#pidfile">PidFile</a></li>
<p>The <code class="directive"><a href="../mod/mpm_common.html#startservers">StartServers</a></code>,
<code class="directive"><a href="#minspareservers">MinSpareServers</a></code>,
<code class="directive"><a href="#maxspareservers">MaxSpareServers</a></code>, and
- <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code> regulate how
+ <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code> regulate how
the parent process creates children to serve requests. In general,
Apache httpd is very self-regulating, so most sites do not need to
adjust these directives from their default values. Sites which
need to serve more than 256 simultaneous requests may need to
- increase <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code>,
- while sites with limited memory may need to decrease <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code> to keep the server from
+ increase <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code>,
+ while sites with limited memory may need to decrease <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code> to keep the server from
thrashing (swapping memory to disk and back). More information
about tuning process creation is provided in the <a href="../misc/perf-tuning.html">performance hints</a>
documentation.</p>
<tr class="odd"><td><a href="mod_lua.html#luaquickhandler" /></td><td></td><td>svdh</td><td>X</td></tr><tr class="odd"><td class="descr" colspan="4">Provide a hook for the quick handler of request processing</td></tr>
<tr><td><a href="mod_lua.html#luaroot">LuaRoot /path/to/a/directory</a></td><td></td><td>svdh</td><td>X</td></tr><tr><td class="descr" colspan="4">Specify the base path for resolving relative paths for mod_lua directives</td></tr>
<tr class="odd"><td><a href="mod_lua.html#luascope">LuaScope once|request|conn|server [max|min max]</a></td><td> once </td><td>svdh</td><td>X</td></tr><tr class="odd"><td class="descr" colspan="4">One of once, request, conn, server -- default is once</td></tr>
-<tr><td><a href="mpm_common.html#maxclients" id="M" name="M">MaxClients <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum number of connections that will be processed
-simultaneously</td></tr>
-<tr class="odd"><td><a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild <var>number</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Limit on the number of connections that an individual child server
+<tr><td><a href="mpm_common.html#maxconnectionsperchild" id="M" name="M">MaxConnectionsPerChild <var>number</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Limit on the number of connections that an individual child server
will handle during its life</td></tr>
-<tr><td><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests <var>number</var></a></td><td> 100 </td><td>sv</td><td>C</td></tr><tr><td class="descr" colspan="4">Number of requests allowed on a persistent
+<tr class="odd"><td><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests <var>number</var></a></td><td> 100 </td><td>sv</td><td>C</td></tr><tr class="odd"><td class="descr" colspan="4">Number of requests allowed on a persistent
connection</td></tr>
-<tr class="odd"><td><a href="mpm_common.html#maxmemfree">MaxMemFree <var>KBytes</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum amount of memory that the main allocator is allowed
+<tr><td><a href="mpm_common.html#maxmemfree">MaxMemFree <var>KBytes</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum amount of memory that the main allocator is allowed
to hold without calling <code>free()</code></td></tr>
+<tr class="odd"><td><a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum number of connections that will be processed
+simultaneously</td></tr>
<tr><td><a href="prefork.html#maxspareservers">MaxSpareServers <var>number</var></a></td><td> 10 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum number of idle child server processes</td></tr>
<tr class="odd"><td><a href="mpm_common.html#maxsparethreads">MaxSpareThreads <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum number of idle threads</td></tr>
<tr><td><a href="mpm_netware.html#maxthreads">MaxThreads <var>number</var></a></td><td> 2048 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Set the maximum number of worker threads</td></tr>
<tr class="odd"><td><a href="mod_lua.html#luaquickhandler" /></td><td></td><td>svdh</td><td>X</td></tr><tr class="odd"><td class="descr" colspan="4">Provide a hook for the quick handler of request processing</td></tr>
<tr><td><a href="mod_lua.html#luaroot">LuaRoot /path/to/a/directory</a></td><td></td><td>svdh</td><td>X</td></tr><tr><td class="descr" colspan="4">Specify the base path for resolving relative paths for mod_lua directives</td></tr>
<tr class="odd"><td><a href="mod_lua.html#luascope">LuaScope once|request|conn|server [max|min max]</a></td><td> once </td><td>svdh</td><td>X</td></tr><tr class="odd"><td class="descr" colspan="4">One of once, request, conn, server -- default is once</td></tr>
-<tr><td><a href="mpm_common.html#maxclients" id="M" name="M">MaxClients <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum number of connections that will be processed
-simultaneously</td></tr>
-<tr class="odd"><td><a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild <var>number</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Limit on the number of connections that an individual child server
+<tr><td><a href="mpm_common.html#maxconnectionsperchild" id="M" name="M">MaxConnectionsPerChild <var>number</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Limit on the number of connections that an individual child server
will handle during its life</td></tr>
-<tr><td><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests <var>number</var></a></td><td> 100 </td><td>sv</td><td>C</td></tr><tr><td class="descr" colspan="4">Number of requests allowed on a persistent
+<tr class="odd"><td><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests <var>number</var></a></td><td> 100 </td><td>sv</td><td>C</td></tr><tr class="odd"><td class="descr" colspan="4">Number of requests allowed on a persistent
connection</td></tr>
-<tr class="odd"><td><a href="mpm_common.html#maxmemfree">MaxMemFree <var>KBytes</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum amount of memory that the main allocator is allowed
+<tr><td><a href="mpm_common.html#maxmemfree">MaxMemFree <var>KBytes</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum amount of memory that the main allocator is allowed
to hold without calling <code>free()</code></td></tr>
+<tr class="odd"><td><a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum number of connections that will be processed
+simultaneously</td></tr>
<tr><td><a href="prefork.html#maxspareservers">MaxSpareServers <var>number</var></a></td><td> 10 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum number of idle child server processes</td></tr>
<tr class="odd"><td><a href="mpm_common.html#maxsparethreads">MaxSpareThreads <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum number of idle threads</td></tr>
<tr><td><a href="mpm_netware.html#maxthreads">MaxThreads <var>number</var></a></td><td> 2048 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Set the maximum number of worker threads</td></tr>
<tr class="odd"><td><a href="mod_lua.html#luaquickhandler" /></td><td></td><td>svdh</td><td>X</td></tr><tr class="odd"><td class="descr" colspan="4">Provide a hook for the quick handler of request processing</td></tr>
<tr><td><a href="mod_lua.html#luaroot">LuaRoot /path/to/a/directory</a></td><td></td><td>svdh</td><td>X</td></tr><tr><td class="descr" colspan="4">Specify the base path for resolving relative paths for mod_lua directives</td></tr>
<tr class="odd"><td><a href="mod_lua.html#luascope">LuaScope once|request|conn|server [max|min max]</a></td><td> once </td><td>svdh</td><td>X</td></tr><tr class="odd"><td class="descr" colspan="4">One of once, request, conn, server -- default is once</td></tr>
-<tr><td><a href="mpm_common.html#maxclients" id="M" name="M">MaxClients <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum number of connections that will be processed
-simultaneously</td></tr>
-<tr class="odd"><td><a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild <var>number</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Limit on the number of connections that an individual child server
+<tr><td><a href="mpm_common.html#maxconnectionsperchild" id="M" name="M">MaxConnectionsPerChild <var>number</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Limit on the number of connections that an individual child server
will handle during its life</td></tr>
-<tr><td><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests <var>number</var></a></td><td> 100 </td><td>sv</td><td>C</td></tr><tr><td class="descr" colspan="4">Number of requests allowed on a persistent
+<tr class="odd"><td><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests <var>number</var></a></td><td> 100 </td><td>sv</td><td>C</td></tr><tr class="odd"><td class="descr" colspan="4">Number of requests allowed on a persistent
connection</td></tr>
-<tr class="odd"><td><a href="mpm_common.html#maxmemfree">MaxMemFree <var>KBytes</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum amount of memory that the main allocator is allowed
+<tr><td><a href="mpm_common.html#maxmemfree">MaxMemFree <var>KBytes</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum amount of memory that the main allocator is allowed
to hold without calling <code>free()</code></td></tr>
+<tr class="odd"><td><a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum number of connections that will be processed
+simultaneously</td></tr>
<tr><td><a href="prefork.html#maxspareservers">MaxSpareServers <var>number</var></a></td><td> 10 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum number of idle child server processes</td></tr>
<tr class="odd"><td><a href="mpm_common.html#maxsparethreads">MaxSpareThreads <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum number of idle threads</td></tr>
<tr><td><a href="mpm_netware.html#maxthreads">MaxThreads <var>number</var></a></td><td> 2048 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Set the maximum number of worker threads</td></tr>
<tr class="odd"><td><a href="mod_lua.html#luaquickhandler" /></td><td></td><td>svdh</td><td>X</td></tr><tr class="odd"><td class="descr" colspan="4">Provide a hook for the quick handler of request processing</td></tr>
<tr><td><a href="mod_lua.html#luaroot">LuaRoot /path/to/a/directory</a></td><td></td><td>svdh</td><td>X</td></tr><tr><td class="descr" colspan="4">Specify the base path for resolving relative paths for mod_lua directives</td></tr>
<tr class="odd"><td><a href="mod_lua.html#luascope">LuaScope once|request|conn|server [max|min max]</a></td><td> once </td><td>svdh</td><td>X</td></tr><tr class="odd"><td class="descr" colspan="4">One of once, request, conn, server -- default is once</td></tr>
-<tr><td><a href="mpm_common.html#maxclients" id="M" name="M">MaxClients <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum number of connections that will be processed
-simultaneously</td></tr>
-<tr class="odd"><td><a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild <var>number</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Limit on the number of connections that an individual child server
+<tr><td><a href="mpm_common.html#maxconnectionsperchild" id="M" name="M">MaxConnectionsPerChild <var>number</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Limit on the number of connections that an individual child server
will handle during its life</td></tr>
-<tr><td><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests <var>number</var></a></td><td> 100 </td><td>sv</td><td>C</td></tr><tr><td class="descr" colspan="4">Number of requests allowed on a persistent
+<tr class="odd"><td><a href="core.html#maxkeepaliverequests">MaxKeepAliveRequests <var>number</var></a></td><td> 100 </td><td>sv</td><td>C</td></tr><tr class="odd"><td class="descr" colspan="4">Number of requests allowed on a persistent
connection</td></tr>
-<tr class="odd"><td><a href="mpm_common.html#maxmemfree">MaxMemFree <var>KBytes</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum amount of memory that the main allocator is allowed
+<tr><td><a href="mpm_common.html#maxmemfree">MaxMemFree <var>KBytes</var></a></td><td> 0 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum amount of memory that the main allocator is allowed
to hold without calling <code>free()</code></td></tr>
+<tr class="odd"><td><a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum number of connections that will be processed
+simultaneously</td></tr>
<tr><td><a href="prefork.html#maxspareservers">MaxSpareServers <var>number</var></a></td><td> 10 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Maximum number of idle child server processes</td></tr>
<tr class="odd"><td><a href="mpm_common.html#maxsparethreads">MaxSpareThreads <var>number</var></a></td><td></td><td>s</td><td>M</td></tr><tr class="odd"><td class="descr" colspan="4">Maximum number of idle threads</td></tr>
<tr><td><a href="mpm_netware.html#maxthreads">MaxThreads <var>number</var></a></td><td> 2048 </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Set the maximum number of worker threads</td></tr>
<p>The most important directives used to control this MPM are
<code class="directive"><a href="../mod/mpm_common.html#threadsperchild">ThreadsPerChild</a></code>, which
controls the number of threads deployed by each child process and
- <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code>, which
+ <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code>, which
controls the maximum total number of threads that may be
launched.</p>
</div>
<li><img alt="" src="../images/right.gif" /> <a href="mod_unixd.html#group">Group</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listen">Listen</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listenbacklog">ListenBacklog</a></li>
-<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxclients">MaxClients</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxmemfree">MaxMemFree</a></li>
+<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#minsparethreads">MinSpareThreads</a></li>
<li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#pidfile">PidFile</a></li>
these directives from their default values. The maximum number of
clients that may be served simultaneously (i.e., the maximum total
number of threads in all processes) is determined by the
- <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code> directive.
+ <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code> directive.
The maximum number of active child processes is determined by
- the <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code>
+ the <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code>
directive divided by the <code class="directive"><a href="../mod/mpm_common.html# threadsperchild">
ThreadsPerChild</a></code> directive.</p>
starting it again. <code class="directive"><a href="../mod/mpm_common.html#serverlimit ">ServerLimit
</a></code> is a hard limit on the number of active child
processes, and must be greater than or equal to the
- <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code>
+ <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code>
directive divided by the <code class="directive"><a href="../mod/mpm_common.html# threadsperchild">
ThreadsPerChild</a></code> directive.
<code class="directive"><a href="../mod/mpm_common.html#threadlimit">ThreadLimit</a></code> is a hard
<p>In addition to the set of active child processes, there may
be additional child processes which are terminating, but where at
least one server thread is still handling an existing client
- connection. Up to <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code> terminating processes
+ connection. Up to <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code> terminating processes
may be present, though the actual number can be expected to be
much smaller. This behavior can be avoided by disabling the
termination of individual child processes, which is achieved using
<li>set the value of <code class="directive"><a href="../mod/mpm_common.html# maxsparethreads">
MaxSpareThreads</a></code> to the same value as
- <code class="directive"><a href="../mod/mpm_common.html#maxclients">MaxClients</a></code></li>
+ <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code></li>
</ul>
<p>A typical configuration of the process-thread controls in
<div class="example"><p><code>
ServerLimit 16<br />
StartServers 2<br />
- MaxClients 150<br />
+ MaxRequestWorkers 150<br />
MinSpareThreads 25<br />
MaxSpareThreads 75<br />
ThreadsPerChild 25
<p><code><strong>rotatelogs</strong>
[ -<strong>l</strong> ]
[ -<strong>L</strong> <var>linkname</var> ]
+ [ -<strong>p</strong> <var>program</var> ]
[ -<strong>f</strong> ]
[ -<strong>v</strong> ]
[ -<strong>e</strong> ]
the log continuously across rotations using a command like
<code>tail -F linkname</code>.</dd>
+<dt><code>-p</code> <var>program</var></dt>
+<dd>Causes the specified program to be executed after each rotation.
+Two arguments are supplied upon execution: the newly opened file and
+the previous file, respectively. <code>rotatelogs</code> does not
+wait for the specified program to terminate before continuing to
+operate, and will not log any error code returned on termination. The
+spawned program uses the same stdin, stdout, and stderr as rotatelogs
+itself, and also inherits the environment.</dd>
+
<dt><code>-f</code></dt>
<dd>Causes the logfile to be opened immediately, as soon as
<code>rotatelogs</code> starts, instead of waiting for the