|
The Documentation Site
© 2007 Metadot Corporation |
FastCGI is a programming interface that can speed up web applications that use the most popular way to have the web server call an application, the common gateway interface (CGI). According to one FastCGI implementor, user requests coming to a Web site and using a specific application program can be handled 3 to 30 times faster using FastCGI. FastCGI is a module of the web server. It requires only small changes to existing server applications (such as Ruby, Perl, etc...) to get the performance benefits. Basically, FastCGI is a program that manages multiple CGI requests within a single process, saving many program instructions for each request. Without FastCGI, each instance of a user requesting a service causes the web server to open a new process that gets control, then load and compile the application, performs the request, and then is closed. With FastCGI, the overhead for one process is shared among all currently processing requests.
sudo apt-get install libapache2-mod-fcgidMore information:
# cat /etc/apache2/mod-enabled/fcgid.conf
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
IPCConnectTimeout 20
# Metadot added this:
# IdleTimeout n (300 seconds)
# An idle fastcgi application will be terminated after IdleTimeout seconds.
IdleTimeout 900
# IdleScanInterval n (120 seconds)
# The scan interval for idle fastcgi applications.
IdleScanInterval 120
# BusyTimeout n (300 seconds)
# A fastcgi application will be terminated if handing a single request
# longer than busy timeout.
BusyTimeout 300
# BusyScanInterval n (120 seconds)
# The scan interval for busy timeout fastcgi applications.
BusyScanInterval 120
# ErrorScanInterval n (3 seconds)
# The scan interval for exit pending fastcgi applications. fastcgi
# applications will be terminated within this scanning.
ErrorScanInterval 9
# ZombieScanInterval n (3 seconds)
# The scan interval for zombie process.
ZombieScanInterval 9
# ProcessLifeTime n (3600 seconds)
# A fastcgi application will be terminated if lifetime expired,
# even no error is detected.
ProcessLifeTime 3600
# MaxProcessCount n (1000)
# The max count of total fastcgi process count.
MaxProcessCount 15
# DefaultMaxClassProcessCount n (100)
# The maximum number of fastcgi application instances allowed to run for
# particular one fastcgi application.
DefaultMaxClassProcessCount 8
# DefaultMinClassProcessCount n (3)
# The minimum number of fastcgi application instances for any one fastcgi
# application.
# Idle fastcgi will not be killed if their count is less than n
# Set this to 0, and tweak IdleTimeout
DefaultMinClassProcessCount 6
</IfModule>