Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>The mod_fcgid Home Page</title>
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body bgcolor="#ffffff">
<table border="0" cellpadding="5" cellspacing="0" width="893">
  <tbody>
    <tr>
      <td align="center" valign="top" width="200"> &nbsp;
      <table cellpadding="5" cellspacing="0">
        <tbody>
          <tr>
            <td align="left" bgcolor="#f8eda6" nowrap="nowrap"> <a
 href="index.htm">Home</a> <br>
            <a href="index.cn.htm">Chinese Info</a> <br>
            <a href="download.htm">Download (source)</a> <br>
            <a href="doc.htm">Documentations</a> <br>
            <a href="feedback.htm">Feedback</a> <br>
            <a
 href="http://sourceforge.net/donate/index.php?group_id=174879"><img
 src="http://images.sourceforge.net/images/project-support.jpg"
 alt="Support This Project" border="0" height="32" width="88"> </a> </td>
          </tr>
        </tbody>
      </table>
      </td>
      <td valign="top" width="669">
      <ul>
        <li>
          <p><b><font size="4">Here are some examples of configuration</font></b></p>
        </li>
      </ul>
      <p><a href="configuration.htm#regular%20fastcgi">Configuration
for Regular fastcgi
(non-PHP, non-Ruby, non-Python)&nbsp;</a></p>
      <p><a href="configuration.htm#suEXEC">Configuration
for suEXEC fastcgi</a></p>
      <p><a href="configuration.htm#PHP">Configuration for PHP
(UNIX)</a><br>
      </p>
      <p><a href="configuration.htm#Ruby">Configuration for Ruby on
Rails</a><br>
      </p>
      <p><a href="configuration.htm#suPHP">Configuration for suPHP
(UNIX)</a></p>
      <p><a href="configuration.htm#PHP-Windows">Configuration
for PHP (Windows)</a></p>
      <p><a href="configuration.htm#Authenticator">Configuration
for Authenticator</a></p>
      <p><a href="configuration.htm#Authorizer">Configuration
for Authorizer</a></p>
      <p><a href="configuration.htm#AccessChecker">Configuration
for AccessChecker</a></p>
      <p>&nbsp; </p>
      <hr>
      <ul>
        <li>
          <h2><a class="mozTocH2" name="mozTocId601839"></a><b><font
 size="4">There are
some other configurations you can set</font></b></h2>
        </li>
      </ul>
      <p><b>IdleTimeout n (300
seconds)</b></p>
      <p>An idle fastcgi application will be terminated after
IdleTimeout
seconds. </p>
      <p><b>IdleScanInterval n (120 seconds)</b></p>
      <p>The scan interval for idle
fastcgi applications. </p>
      <p><b>BusyTimeout n (300 seconds)</b></p>
      <p>a fastcgi
application will be terminated if handing a single request longer than
busy
timeout.</p>
      <p><b>BusyScanInterval n (120 seconds)</b></p>
      <p>The scan interval for busy
timeout fastcgi applications.</p>
      <p><b>ErrorScanInterval n (3 seconds)</b></p>
      <p>The
scan interval for exit pending fastcgi applications. fastcgi
applications will
be terminated within this scanning.</p>
      <p><b>ZombieScanInterval n (3 seconds)</b></p>
      <p>The
scan interval for zombie process.&nbsp;</p>
      <p><b>ProcessLifeTime n (3600 seconds)</b></p>
      <p>A
fastcgi application will be terminated if lifetime expired, even no
error is
detected.</p>
      <p><b>SocketPath path (logs/fcgidsock)</b></p>
      <p>The directory to put the
UNIX domain socket. (UNIX only)<br>
      </p>
      <p><span style="font-weight: bold;">SharememPath path
(logs/fcgid_shm)</span><br>
      </p>
      <p>The share memory file path. (UNIX only) (version &gt;= 2.1
only)<br>
      </p>
      <p><b>SpawnScoreUpLimit n (10)</b></p>
      <p>The
spawn-speed control score up water limit. Score increases while a
process is spawned or terminated, and decreases
as time progresses; while the score is higher than <b>SpawnScoreUpLimit</b>,
the spawning will be
held for a while. The higher this number is, the higher speed of the
spawning
can be.</p>
      <p><b>SpawnScore n (1)</b></p>
      <p>The weight of spawning.&nbsp; This weight
will be plused to the spawn-control score on every spawn. The higher
this number
is, the lower speed of spawning can be.</p>
      <p><b>TerminationScore n (2)</b></p>
      <p>The
weight of termination. This weight will be plused to the score while
fastcgi
process terminates. The higher this number is, the lower speed of
spawning can
be.</p>
      <p><b>MaxProcessCount n (1000)</b></p>
      <p>The max count of total fastcgi process
count.</p>
      <p><b>DefaultMaxClassProcessCount n (100)</b></p>
      <p>The maximum number of
fastcgi application instances allowed to run for any one fastcgi
application.&nbsp;</p>
      <p><b>DefaultMinClassProcessCount n
(3)</b></p>
      <p>The minimum number of
fastcgi application instances for any one fastcgi application.&nbsp;</p>
      <p><b>DefaultInitEnv&nbsp;
env_name env_value</b></p>
      <p>The default environment variables before a fastcgi
application is spawned. You can set this configuration more
than once.<br>
      </p>
      <table style="text-align: left; width: 667px; height: 147px;"
 border="1" cellpadding="2" cellspacing="2">
        <tbody>
          <tr>
            <td style="vertical-align: top;">Note: If you get:<br>
            <div><span style="font-weight: bold;">Can't create TCP/IP
socket (10106)</span> error while running PHP script(<span
 style="font-weight: bold;">on Win32 only</span>), you will have to set
these(<span style="font-weight: bold;">Please modify the values if
necessary</span>):<br>
            <font face="Arial" size="2">DefaultInitEnv PHPRC "c:/php/"<br>
DefaultInitEnv PATH
"c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"<br>
DefaultInitEnv SystemRoot "C:/Windows"<br>
DefaultInitEnv SystemDrive "C:"<br>
DefaultInitEnv TEMP "C:/WINDOWS/TEMP"<br>
DefaultInitEnv TMP "C:/WINDOWS/TEMP"<br>
DefaultInitEnv windir "C:/WINDOWS"<br>
            <br>
(Thank Steffen of apachelounge.com for this note)<br>
            </font></div>
            </td>
          </tr>
        </tbody>
      </table>
      <p><br>
      </p>
      <p><b>IPCConnectTimeout n (3 seconds)</b></p>
      <p>The connect timeout to a
fastcgi application.&nbsp;</p>
      <p><b>IPCCommTimeout n (20 seconds)</b></p>
      <p>The communication
timeout to a fastcgi application. Please increase this value if your
CGI have a
slow initialization or slow respond.</p>
      <p><b>OutputBufferSize n (64k bytes)</b></p>
      <p>CGI
output cache buffer size.</p>
      <p><b>PHP_Fix_Pathinfo_Enable</b><b> n(n=0/1, default 0)</b></p>
      <p>If
you are using PHP and set cgi.fix_pathinfo=1 in php.ini, set
PHP_Fix_Pathinfo_Enable 1.</p>
      <p><b>MaxRequestsPerProcess n (-1)</b></p>
      <p>(Added in
version 1.11, patch from Robert L Mathews)</p>
      <p>Adds a MaxRequestsPerProcess parameter that allows mod_fcgid
to
exit after handling a certain number of requests, similar to the
existing ProcessLifeTime option.&nbsp;</p>
      <p>This solves a problem with PHP in FastCGI mode. By default,
PHP stops
accepting new FastCGI connections after handling 500 requests;
unfortunately, there is a potential race condition during the PHP
cleanup code in which
PHP can be shutting down but still have the socket open, so mod_fcgid
under heavy load can send request number 501 to PHP and have it
"accepted", but then
PHP appears to simply exit, causing errors.</p>
      <p>If you are using PHP, you should
set it to 500. -1 mean fastcgi process will not exit no matter how many
requests
it has handled.<br>
      </p>
      </td>
    </tr>
  </tbody>
</table>
</body>
</html>