httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r819677 - /httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.xml
Date Mon, 28 Sep 2009 19:13:36 GMT
Author: trawick
Date: Mon Sep 28 19:13:36 2009
New Revision: 819677

try to clarify some of the PHP_FCGI_MAX_REQUESTS notes,
and fix the example to avoid the 500 error with request
n + 1

also note that PHP_FCGI_CHILDREN doesn't fit with mod_fcgid


Modified: httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.xml
--- httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.xml (original)
+++ httpd/mod_fcgid/trunk/docs/manual/mod/mod_fcgid.xml Mon Sep 28 19:13:36 2009
@@ -264,9 +264,8 @@
     <directive module="mod_fcgid">FCGIDWrapper</directive> 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
     <directive module="mod_fcgid">FCGIDDefaultInitEnv</directive>,
     but they then apply to all applications.)</p>
@@ -281,6 +280,9 @@
     <example><title>Configuration directives</title>
+    # FCGIDMaxRequestsPerProcess should be &lt;= 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 />
     &lt;Location /phpapp/&gt;<br />
@@ -311,7 +313,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 />
@@ -319,27 +321,30 @@
     exec /usr/local/bin/php-cgi<br />
-    <note type="hint"><title>Note</title>
+    <note type="hint"><title>Special PHP considerations</title>
     <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 <directive module="mod_fcgid">FCGIDMaxRequestsPerProcess</directive>
-    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.
+    <directive module="mod_fcgid">FCGIDMaxRequestsPerProcess</directive>
+    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>
-    <p>TODO: Should PHP child process management always be disabled
-    with mod_fcgid?</p>
   <section id="process-mgmt">

View raw message