You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2009/09/28 21:14:04 UTC
svn commit: r819678 -
/httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.html.en
Author: trawick
Date: Mon Sep 28 19:14:04 2009
New Revision: 819678
URL: http://svn.apache.org/viewvc?rev=819678&view=rev
Log:
update HTML transformation
Modified:
httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.html.en
Modified: httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.html.en
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.html.en?rev=819678&r1=819677&r2=819678&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.html.en (original)
+++ httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.html.en Mon Sep 28 19:14:04 2009
@@ -313,9 +313,8 @@
<code class="directive"><a href="#fcgidwrapper">FCGIDWrapper</a></code> directive
and a corresponding wrapper script. The wrapper script can be
an appropriate place to define any environment variables required
- by the application, such as <code>PHP_FCGI_MAX_REQUESTS</code>,
- <code>PHP_FCGI_CHILDREN</code>, or anything else. (Environment
- variables can also be set with
+ by the application, such as <code>PHP_FCGI_MAX_REQUESTS</code>
+ or anything else. (Environment variables can also be set with
<code class="directive"><a href="#fcgiddefaultinitenv">FCGIDDefaultInitEnv</a></code>,
but they then apply to all applications.)</p>
@@ -330,6 +329,9 @@
</code></p></div>
<div class="example"><h3>Configuration directives</h3><p><code>
+ # FCGIDMaxRequestsPerProcess should be <= PHP_FCGI_MAX_REQUESTS<br />
+ # The example PHP wrapper script overrides the default PHP setting.<br />
+ FCGIDMaxRequestsPerProcess 10000<br />
Alias /phpapp/ /usr/local/phpapp/<br />
<Location /phpapp/><br />
<span class="indent">
@@ -360,7 +362,7 @@
#!/bin/sh<br />
# Set desired PHP_FCGI_* environment variables.<br />
# Example:<br />
- # PHP FastCGI processes normally exit after 500 requests.<br />
+ # PHP FastCGI processes exit after 500 requests by default.<br />
PHP_FCGI_MAX_REQUESTS=10000<br />
export PHP_FCGI_MAX_REQUESTS<br />
<br />
@@ -368,27 +370,30 @@
exec /usr/local/bin/php-cgi<br />
</code></p></div>
- <div class="note"><h3>Note</h3>
+ <div class="note"><h3>Special PHP considerations</h3>
<p>By default, PHP FastCGI processes exit after handling 500
requests, and they may exit after this module has already
- connected to the application and sent a request. When that
+ connected to the application and sent the next request. When that
occurs, an error will be logged and <code>500 Internal Server
Error</code> will be returned to the client. This PHP behavior
can be disabled by setting <code>PHP_FCGI_MAX_REQUESTS</code> to
0, but that can be a problem if the PHP application leaks
resources. Alternatively, <code>PHP_FCGI_MAX_REQUESTS</code> can
be set to a much higher value than the default to reduce the
- frequency of this problem.</p>
-
- <p>The <code class="directive"><a href="#fcgidmaxrequestsperprocess">FCGIDMaxRequestsPerProcess</a></code>
- directive provides another way to address the issue: set this
- directive to the same value as the corresponding PHP setting, and
- no additional requests will be sent to the application once it is
- ready to exit.</p>
+ frequency of this problem.
+ <code class="directive"><a href="#fcgidmaxrequestsperprocess">FCGIDMaxRequestsPerProcess</a></code>
+ can be set to a value less than or equal to
+ <code>PHP_FCGI_MAX_REQUESTS</code> to resolve the problem.</p>
+
+ <p>PHP child process management (<code>PHP_FCGI_CHILDREN</code>)
+ should always be disabled with mod_fcgid, which will only route
+ requests to application processes it has spawned. Any child
+ processes created by PHP will be unused and may not be terminated
+ properly. By default, and with the environment variable setting
+ <code>PHP_FCGI_CHILDREN=0</code>, PHP child process management is
+ disabled.</p>
</div>
- <p>TODO: Should PHP child process management always be disabled
- with mod_fcgid?</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="process-mgmt" id="process-mgmt">Process Management</a></h2>