perchild.html revision e0b181d3bfa99dfb992df3024b397660cb7afbe9
22dd6d9af47163ee081d6c505d0a13dbf40ba87aChristian Maeder<html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><!--
22dd6d9af47163ee081d6c505d0a13dbf40ba87aChristian Maeder XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
df098122ddc81fe1cb033a151f7305c1dda2dc81Christian Maeder This file is generated from xml source: DO NOT EDIT
b03274844ecd270f9e9331f51cc4236a33e2e671Christian Maeder XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
22dd6d9af47163ee081d6c505d0a13dbf40ba87aChristian Maeder --><title>perchild- Apache HTTP Server</title><link rel="stylesheet" type="text/css" href="/style/manual.css"/></head><body><blockquote><div align="center"><img src="/images/sub.gif" alt="[APACHE DOCUMENTATION]"/><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module perchild</h1><table bgcolor="#cccccc" cellpadding="0" cellspacing="1"><tr><td><table bgcolor="#ffffff"><tr><td valign="top"><span class="help">Description:</span></td><td>Multi-Processing Module allowing for daemon processes
2eeec5240b424984e3ee26296da1eeab6c6d739eChristian Maeder serving requests to be assigned a variety of different
22dd6d9af47163ee081d6c505d0a13dbf40ba87aChristian Maeder userids</td></tr><tr><td><a class="help" href="module-dict.html#Status">Status:</a></td><td>MPM</td></tr><tr><td><a class="help" href="module-dict.html#ModuleIdentifier">Module Identifier:</a></td><td>mpm_perchild_module</td></tr></table></td></tr></table><h2>Summary</h2>
22dd6d9af47163ee081d6c505d0a13dbf40ba87aChristian Maeder<blockquote><table><tr><td bgcolor="#ffe5f5">
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian MaederThis MPM does not currently work on most platforms. Work is ongoing to
e6d40133bc9f858308654afb1262b8b483ec5922Till Mossakowskimake it functional.
1bb1684c83317dfd1692ab53415027b67d8f2faeTill Mossakowski <p>This Multi-Processing Module (MPM) implements a hybrid
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder multi-process, multi-threaded web server. A fixed number of
f3faf4e4346b6224a3aaeeac11bac8b5c8932a29Christian Maeder processes create threads to handle requests. Fluctuations in
f3faf4e4346b6224a3aaeeac11bac8b5c8932a29Christian Maeder load are handled by increasing or decreasing the number of
f3faf4e4346b6224a3aaeeac11bac8b5c8932a29Christian Maeder threads in each process.</p>
f3faf4e4346b6224a3aaeeac11bac8b5c8932a29Christian Maeder <p>A single control process launches the number of child processes
f3faf4e4346b6224a3aaeeac11bac8b5c8932a29Christian Maeder indicated by the <a class="directive" href="mpm_common.html#numservers"><code class="directive">NumServers</code></a> directive at server
f8fe1f095d5b7fd96bde0784289b001446e60d0bChristian Maeder startup. Each child process creates threads as specified in the
74b841a4b332085d5fd79975a13313c2681ae595Christian Maeder <code>StartThreads</code> directive. The individual threads then
74b841a4b332085d5fd79975a13313c2681ae595Christian Maeder listen for connections and serve them when they arrive.</p>
f3faf4e4346b6224a3aaeeac11bac8b5c8932a29Christian Maeder <p>Apache always tries to maintain a pool of <em>spare</em> or
95c3e5d11dcee331dc3876a9bf0c1d6daa38e2caChristian Maeder idle server threads, which stand ready to serve incoming
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder requests. In this way, clients do not need to wait for new
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder threads to be created. For each child process, Apache assesses
1bc5dccbf0083a620ae1181c717fea75e4af5e5cChristian Maeder the number of idle threads and creates or destroys threads to
7bf4436b6f9987b070033a323757b206c898c1beChristian Maeder keep this number within the boundaries specified by
e9249d3ecd51a2b6a966a58669953e58d703adc6Till Mossakowski <code>MinSpareThreads</code> and <code>MaxSpareThreads</code>.
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder Since this process is very self-regulating, it is rarely
410ff490af511ffa09b52e4de631d36a154b9730Christian Maeder necessary to modify these directives from their default values.
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder The maximum number of clients that may be served simultaneously
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder is determined by multiplying the number of server processes
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder that will be created (<code>NumServers</code>) by the maximum
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder number of threads created in each process
a80f2865b6b40a922bcccfce0cb0d047edc33e3aChristian Maeder <p>While the parent process is usually started as root under
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder Unix in order to bind to port 80, the child processes and
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder threads are launched by Apache as a less-privileged user. The
88ece6e49930670e8fd3ee79c89a2e918d2fbd0cChristian Maeder <code>User</code> and <code>Group</code> directives are used to
6108a4c3e891e85e6b36a658382d7e78ad4ce9e7Christian Maeder set the privileges of the Apache child processes. The child
89ab08979dc23d72e9e09c8990a8c44847041d6fChristian Maeder processes must be able to read all the content that will be
410ff490af511ffa09b52e4de631d36a154b9730Christian Maeder served, but should have as few privileges beyond that as
a80f2865b6b40a922bcccfce0cb0d047edc33e3aChristian Maeder possible. In addition, unless <a href="/suexec.html">suexec</a> is used, these directives also
22dd6d9af47163ee081d6c505d0a13dbf40ba87aChristian Maeder set the privileges which will be inherited by CGI scripts.</p>
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder <p><code>MaxRequestsPerChild</code> controls how frequently the
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder server recycles processes by killing old ones and launching new
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder <p>See also: <a href="/bind.html">Setting which addresses and
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder <p>In addition it adds the extra ability to specify that
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder specific processes should serve requests under different
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder userids. These processes can then be associated with specific
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder virtual hosts.</p>
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder<h2>Directives</h2><ul><li><a href="#assignuserid">AssignUserId</a></li><li><a href="#childperuserid">ChildPerUserId</a></li><li><a href="mpm_common.html#coredumpdirectory">CoreDumpDirectory</a></li><li><a href="mpm_common.html#group">Group</a></li><li><a href="mpm_common.html#listen">Listen</a></li><li><a href="mpm_common.html#listenbacklog">ListenBacklog</a></li><li><a href="mpm_common.html#lockfile">LockFile</a></li><li><a href="mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a></li><li><a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li><li><a href="mpm_common.html#maxthreadsperchild">MaxThreadsPerChild</a></li><li><a href="mpm_common.html#minsparethreads">MinSpareThreads</a></li><li><a href="mpm_common.html#numservers">NumServers</a></li><li><a href="mpm_common.html#pidfile">PidFile</a></li><li><a href="mpm_common.html#scoreboardfile">ScoreBoardFile</a></li><li><a href="mpm_common.html#sendbuffersize">SendBufferSize</a></li><li><a href="mpm_common.html#startthreads">StartThreads</a></li><li><a href="mpm_common.html#user">User</a></li></ul><hr/><h2><a name="AssignUserId">AssignUserId</a> <a name="assignuserid">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td/></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>AssignUserID <em>user_id</em> <em>group_id</em></td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>virtual host</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>MPM</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>perchild</td></tr></table></td></tr></table>
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maeder <p>Tie a virtual host to a specific child process. Requests addressed to
95c27038582e8a2ce24923bee69ef15931b8b87bChristian Maederthe virtual host where this directive appears will be served by the process
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maederrunning with the specified user and group id.</p>
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maeder<hr/><h2><a name="ChildPerUserId">ChildPerUserId</a> <a name="childperuserid">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td/></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>ChildPerUserID <em>user_id</em>
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maeder<em>group_id</em> <em>child_id</em></td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>MPM</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>perchild</td></tr></table></td></tr></table>
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maeder <p>Specify a user id and group id for a specific child process. The number of
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maederchildren if set by the <a href="mpm_common.html#numservers">NumServers</a>
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maederdirective. For example, the default value for <a href="mpm_common.html#numservers">NumServers</a> is 5 and that means
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maederchildren ids 1,2,3,4 and 5 are available for assigment. If a child does not
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maederhave an associated ChildPerUserID, it inherits the <a href="mpm_common.html#user">User</a> and <a href="mpm_common.html#group">Group</a> settings from the main server </p>
f1b14608f0f3db464c3aded480e49522d73b08e5Christian Maeder<hr/></blockquote><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img src="/images/index.gif" alt="Index"/></a><a href="../"><img src="/images/home.gif" alt="Home"/></a></body></html>