dd0b463

dbeb002
<html>
dbeb002
<head>
dd0b463
  <title>The mod_fcgid Home Page</title>
dd0b463
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
dbeb002
</head>
dbeb002
<body bgcolor="#ffffff">
dbeb002
dd0b463
  
dd0b463
    
dd0b463
        
dd0b463
      
dd0b463
        
dd0b463
          
dd0b463
             
dd0b463
 href="index.htm">Home 
dd0b463
            Chinese Info 
dd0b463
            Download (source) 
dd0b463
            Documentations 
dd0b463
            Feedback 
dd0b463
            
dd0b463
 href="http://sourceforge.net/donate/index.php?group_id=174879">
dd0b463
 src="http://images.sourceforge.net/images/project-support.jpg"
dd0b463
 alt="Support This Project" border="0" height="32" width="88">  
dd0b463
          
dd0b463
        
dd0b463
      
dd0b463
      
dd0b463
      
dd0b463
      
dd0b463
        
  • dd0b463
              

    <font size="4">Here are some examples of configuration</font>

    dd0b463
            
    
    dd0b463
          
    
    dd0b463
          

    Configuration

    dd0b463
    for Regular fastcgi
    
    dd0b463
    (non-PHP, non-Ruby, non-Python) 

    dd0b463
          

    Configuration

    dd0b463
    for suEXEC fastcgi

    dd0b463
          

    Configuration for PHP

    dd0b463
    (UNIX)
    dd0b463
          

    dd0b463
          

    Configuration for Ruby on

    dd0b463
    Rails
    dd0b463
          

    dd0b463
          

    Configuration for suPHP

    dd0b463
    (UNIX)

    dd0b463
          

    Configuration

    dd0b463
    for PHP (Windows)

    dd0b463
          

    Configuration

    dd0b463
    for Authenticator

    dd0b463
          

    Configuration

    dd0b463
    for Authorizer

    dd0b463
          

    Configuration

    dd0b463
    for AccessChecker

    dd0b463
          

     

    dd0b463
          
    dd0b463
          
    dd0b463
            
  • dd0b463
              

    dd0b463
     size="4">There are
    
    dbeb002
    some other configurations you can set</font>
    
    dd0b463
            
    
    dd0b463
          
    
    dd0b463
          

    IdleTimeout n (300

    dd0b463
    seconds)

    dd0b463
          

    An idle fastcgi application will be terminated after

    dd0b463
    IdleTimeout
    
    dd0b463
    seconds. 

    dd0b463
          

    IdleScanInterval n (120 seconds)

    dd0b463
          

    The scan interval for idle

    dd0b463
    fastcgi applications. 

    dd0b463
          

    BusyTimeout n (300 seconds)

    dd0b463
          

    a fastcgi

    dd0b463
    application will be terminated if handing a single request longer than
    
    dd0b463
    busy
    
    dd0b463
    timeout.

    dd0b463
          

    BusyScanInterval n (120 seconds)

    dd0b463
          

    The scan interval for busy

    dd0b463
    timeout fastcgi applications.

    dd0b463
          

    ErrorScanInterval n (3 seconds)

    dd0b463
          

    The

    dd0b463
    scan interval for exit pending fastcgi applications. fastcgi
    
    dd0b463
    applications will
    
    dd0b463
    be terminated within this scanning.

    dd0b463
          

    ZombieScanInterval n (3 seconds)

    dd0b463
          

    The

    dd0b463
    scan interval for zombie process. 

    dd0b463
          

    ProcessLifeTime n (3600 seconds)

    dd0b463
          

    A

    dd0b463
    fastcgi application will be terminated if lifetime expired, even no
    
    dd0b463
    error is
    
    dd0b463
    detected.

    dd0b463
          

    SocketPath path (logs/fcgidsock)

    dd0b463
          

    The directory to put the

    dd0b463
    UNIX domain socket. (UNIX only)
    dd0b463
          

    dd0b463
          

    SharememPath path

    dd0b463
    (logs/fcgid_shm)
    dd0b463
          

    dd0b463
          

    The share memory file path. (UNIX only) (version >= 2.1

    dd0b463
    only)
    dd0b463
          

    dd0b463
          

    SpawnScoreUpLimit n (10)

    dd0b463
          

    The

    dd0b463
    spawn-speed control score up water limit. Score increases while a
    
    dd0b463
    process is spawned or terminated, and decreases
    
    dd0b463
    as time progresses; while the score is higher than SpawnScoreUpLimit,
    
    dd0b463
    the spawning will be
    
    dd0b463
    held for a while. The higher this number is, the higher speed of the
    
    dd0b463
    spawning
    
    dd0b463
    can be.

    dd0b463
          

    SpawnScore n (1)

    dd0b463
          

    The weight of spawning.  This weight

    dd0b463
    will be plused to the spawn-control score on every spawn. The higher
    
    dd0b463
    this number
    
    dd0b463
    is, the lower speed of spawning can be.

    dd0b463
          

    TerminationScore n (2)

    dd0b463
          

    The

    dd0b463
    weight of termination. This weight will be plused to the score while
    
    dd0b463
    fastcgi
    
    dd0b463
    process terminates. The higher this number is, the lower speed of
    
    dd0b463
    spawning can
    
    dd0b463
    be.

    dd0b463
          

    MaxProcessCount n (1000)

    dd0b463
          

    The max count of total fastcgi process

    dd0b463
    count.

    dd0b463
          

    DefaultMaxClassProcessCount n (100)

    dd0b463
          

    The maximum number of

    dd0b463
    fastcgi application instances allowed to run for any one fastcgi
    
    dd0b463
    application. 

    dd0b463
          

    DefaultMinClassProcessCount n

    dd0b463
    (3)

    dd0b463
          

    The minimum number of

    dd0b463
    fastcgi application instances for any one fastcgi application. 

    dd0b463
          

    DefaultInitEnv 

    dd0b463
    env_name env_value

    dd0b463
          

    The default environment variables before a fastcgi

    dbeb002
    application is spawned. You can set this configuration more
    
    dd0b463
    than once.
    dd0b463
          

    dd0b463
          
    dd0b463
     border="1" cellpadding="2" cellspacing="2">
    
    dd0b463
            
    
    dd0b463
              
    
    dd0b463
                Note: If you get:
    dd0b463
                
    Can't create TCP/IP
    dd0b463
    socket (10106) error while running PHP script(
    dd0b463
     style="font-weight: bold;">on Win32 only), you will have to set
    
    dd0b463
    these(Please modify the values if
    
    dd0b463
    necessary):
    dd0b463
                <font face="Arial" size="2">DefaultInitEnv PHPRC "c:/php/"
    dd0b463
    DefaultInitEnv PATH
    
    dd0b463
    "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
    dd0b463
    DefaultInitEnv SystemRoot "C:/Windows"
    dd0b463
    DefaultInitEnv SystemDrive "C:"
    dd0b463
    DefaultInitEnv TEMP "C:/WINDOWS/TEMP"
    dd0b463
    DefaultInitEnv TMP "C:/WINDOWS/TEMP"
    dd0b463
    DefaultInitEnv windir "C:/WINDOWS"
    dd0b463
                
    dd0b463
    (Thank Steffen of apachelounge.com for this note)
    dd0b463
                </font>
    
    dd0b463
                
    
    dd0b463
              
    
    dd0b463
            
    
    dd0b463
          
    
    dd0b463
          


    dd0b463
          

    dd0b463
          

    IPCConnectTimeout n (3 seconds)

    dd0b463
          

    The connect timeout to a

    dd0b463
    fastcgi application. 

    dd0b463
          

    IPCCommTimeout n (20 seconds)

    dd0b463
          

    The communication

    dd0b463
    timeout to a fastcgi application. Please increase this value if your
    
    dd0b463
    CGI have a
    
    dd0b463
    slow initialization or slow respond.

    dd0b463
          

    OutputBufferSize n (64k bytes)

    dd0b463
          

    CGI

    dd0b463
    output cache buffer size.

    dd0b463
          

    PHP_Fix_Pathinfo_Enable n(n=0/1, default 0)

    dd0b463
          

    If

    dbeb002
    you are using PHP and set cgi.fix_pathinfo=1 in php.ini, set
    
    dd0b463
    PHP_Fix_Pathinfo_Enable 1.

    dd0b463
          

    MaxRequestsPerProcess n (-1)

    dd0b463
          

    (Added in

    dd0b463
    version 1.11, patch from Robert L Mathews)

    dd0b463
          

    Adds a MaxRequestsPerProcess parameter that allows mod_fcgid

    dd0b463
    to
    
    dd0b463
    exit after handling a certain number of requests, similar to the
    
    dd0b463
    existing ProcessLifeTime option. 

    dd0b463
          

    This solves a problem with PHP in FastCGI mode. By default,

    dd0b463
    PHP stops
    
    dd0b463
    accepting new FastCGI connections after handling 500 requests;
    
    dd0b463
    unfortunately, there is a potential race condition during the PHP
    
    dd0b463
    cleanup code in which
    
    dd0b463
    PHP can be shutting down but still have the socket open, so mod_fcgid
    
    dd0b463
    under heavy load can send request number 501 to PHP and have it
    
    dd0b463
    "accepted", but then
    
    dd0b463
    PHP appears to simply exit, causing errors.

    dd0b463
          

    If you are using PHP, you should

    dd0b463
    set it to 500. -1 mean fastcgi process will not exit no matter how many
    
    dd0b463
    requests
    
    c5881af
    it has handled.
    dd0b463
          

    dd0b463
          
    
    dd0b463
        
    
    dd0b463
      
    
    dbeb002
    
    
    dd0b463
    </body>
    
    dd0b463
    </html>