FastCgi 翻译文档

  同事业余时间翻译的,我把它整理了出来,其中绿色的是我没有使用默认值的参数。

IdleTimeout n (300 seconds)

An idle fastcgi application will be terminated after IdleTimeout seconds.

空闲线程将在 n 秒后被终止。

IdleScanInterval n (120 seconds)

The scan interval for idle fastcgi applications.

扫描空闲线程的时间间隔。

BusyTimeout n (300 seconds)

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

一个线程被单独占用 n 秒后将被终止。

BusyScanInterval n (120 seconds)

The scan interval for busy timeout fastcgi applications.

扫描繁忙线程的时间间隔。

ErrorScanInterval n (3 seconds)

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

扫描意外退出线程的时间间隔。该线程在此次扫描中将被终止。

ZombieScanInterval n (3 seconds)

The scan interval for zombie process.

扫描僵尸进程的时间间隔。

ProcessLifeTime n (3600 seconds)

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

进程存活时间。到 n 秒后,即使没有发生错误也会被终止。

SocketPath path (logs/fcgidsock)

The directory to put the UNIX domain socket. (UNIX only)

UNIX接口日志存放目录。

SpawnScoreUpLimit n (10)

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 SpawnScoreUpLimit, the spawning will be held for a while. The higher this number is, the higher speed of the spawning can be.

生成速度控制值。当一个进程产生或终止,此数值会增加,并且随着时间的推移而减少增加的程度;当此数值高于SpawnScoreUpLimit 时,正在产生的进程会稍停一会。此数据越高,生成进程的速度将越快。

SpawnScore n (1)

The weight of spawning.  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.

生成速度权重。对每一个进程来讲,这个数值会加上生成速度控制值。但是这个值越大,生成速度越慢。

TerminationScore n (2)

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.

消亡权重。这个值越大,生成速度越慢。

MaxProcessCount n (1000)

The max count of total fastcgi process count.

进程最大值。

DefaultMaxClassProcessCount n (100)

The maximum number of fastcgi application instances allowed to run for any one fastcgi application.

fastcgi可以运行fastcgi程序的最大值。

DefaultMinClassProcessCount n (3)

The minimum number of fastcgi application instances for any one fastcgi application.

fastcgi可以运行fastcgi程序的最小值。

DefaultInitEnv  env_name env_value

The default environment variables before a fastcgi application is spawned. You can set this configuration more than once.

Note: If you get:
Can’t create TCP/IP socket (10106) error while running PHP script(on Win32 only), you will have to set these(Please modify the values if necessary):
DefaultInitEnv PHPRC “c:/php/”
DefaultInitEnv PATH “c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;”
DefaultInitEnv SystemRoot “C:/Windows”
DefaultInitEnv SystemDrive “C:”
DefaultInitEnv TEMP “C:/WINDOWS/TEMP”
DefaultInitEnv TMP “C:/WINDOWS/TEMP”
DefaultInitEnv windir “C:/WINDOWS”

(Thank Steffen of apachelounge.com for this note)

Fastcgi程序运行前的默认环境变量。此变量可以被多次设置。

IPCConnectTimeout n (3 seconds)

The connect timeout to a fastcgi application.

Fastcgi程序连接超时时间。

IPCCommTimeout n (20 seconds)

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

Fastcgi程序通讯超时时间。如果你的CGI初始化或反应较慢,请适当增加些数值。

OutputBufferSize n (64k bytes)

CGI output cache buffer size.

CGI输出缓存大小。

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

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

MaxRequestsPerProcess n (-1)

(Added in version 1.11, patch from Robert L Mathews)

Adds a MaxRequestsPerProcess parameter that allows mod_fcgid to exit after handling a certain number of requests, similar to the existing ProcessLifeTime option.

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.

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.

MaxRequestsPerProcess允许mod_fcgid处理了指定数量的请求以后退出,有点像进程存活时间。

PHP在FastCGI模式的缺省情况下,PHP处理了500个请求以后会拒绝接受新的FastCGI连接而直接退出。然而实际情况是:PHP停止了,但通讯仍然没有结束,这种看似正常退出PHP的情况就可能产生错误。mod_fcgid可以在高负载的情况下发送第501个请求给PHP并且能保证PHP接受了这个请求,而后PHP才安全退出。
PHP应该把这个设置成500,-1代表fastcgi永远不会退出 。

 

http://weblog.mywww.biz/arnold/read.php?51

发表评论

电子邮件地址不会被公开。 必填项已用*标注