Home >Backend Development >PHP Tutorial >Chinese translation of mod_fcgid instruction_PHP tutorial

Chinese translation of mod_fcgid instruction_PHP tutorial

WBOY
WBOYOriginal
2016-07-14 10:11:201887browse

FcgidBusyScanInterval command

Description: Scan busy timeout process interval

Syntax: FcgidBusyScanInterval seconds

Default: FcgidBusyScanInterval 120

Environment: Server Configuration

Status: External

Corresponding old command: BusyScanInterval

This module will perform FcgidBusyTimeout check in this interval.

FcgidBusyTimeout command
Description: Kill FastCGI applications that process requests for more than the time set by FcgidBusyTimeout

Syntax: FcgidBusyTimeout seconds

Default: FcgidBusyTimeout 300

Environment: Server configuration, virtual host

Status: External

Corresponding old command: BusyTimeout

This is the maximum time limit for processing requests. If the FastCGI request exceeds the number of seconds set by FcgidBusyTimeou, the request will be terminated. The time when the check is performed will be defined by FcgidBusyScanInterval, and the request processing is valid within the set time. The purpose of this command is to terminate a hung application. The default timeout may need to be increased so that applications can take longer to process requests.

FcgidBusyScanInterval 120 #Corresponds to FcgidBusyTimeout, checks every 120 seconds

FcgidBusyTimeout 300 #Fastcgi requests exceeding 300 seconds will be terminated

FcgidConnectTimeout command
Description: Fastcgi service times out after waiting for the set time parameter (Fastcgi connection timeout)

Syntax: FcgidConnectTimeout seconds

Default: FcgidConnectTimeout 3

Environment: Server configuration, virtual host

Status: External

Corresponding old command: IPCConnectTimeout

This is the maximum cycle time set by the Fastcgi module in Windows when it tries to connect to an application. When the waiting time exceeds this time, a timeout will occur. (This command is not suitable for UNIX)

FcgidErrorScanInterval command
Description: Scan and exit suspended processes within the interval

Syntax: FcgidErrorScanInterval seconds

Default: FcgidErrorScanInterval3

Environment: Server Configuration

Status: External

Corresponding old command: ErrorScanInterval

This is the interval module that will handle pending process termination. Terminate any process on which FcgidIdleTimeout or FcgidProcessLifeTime is waiting.

FcgidIdleScanInterval command
Description: Scan interval for idle timeout process

Syntax: FcgidIdleScanInterval seconds

Default: FcgidFixPathinfo120

Environment: Server Configuration

Status: External

Corresponding old command: IdleScanInterval

Within this set time interval, the module will search for processes that have exceeded the maximum valid time set by FcgidIdleTimeout or FcgidProcessLifeTime, and processes that exceed this time will be terminated.

FcgidIdleTimeout command
Note: The idle Fastcgi program will be killed after exceeding the set time

Syntax: FcgidIdleTimeout seconds

Default: FcgidIdleTimeout 300

Environment: Server Configuration

Status: External

Corresponding old command: IdleTimeout

After the set idle time, the Fastcgi program that does not process the request will be terminated. The check of the idle process is used in conjunction with the FcgidIdleScanInterval above.

FcgidIdleScanInterval 120 #Corresponds to FcgidIdleTimeout, checks every 120 seconds

FcgidIdleTimeout 300 #fastcgi idle process that exceeds 300 seconds will be terminated

FcgidInitialEnv command
Description: Pass the value of the environment variable and some optional values ​​​​to Fastcgi

Syntax: FcgidInitialEnv name [ value ]

Default: none

Environment: Server Configuration

Status: External

Corresponding old command: DefaultInitEnv

Use FcgidInitialEnv to define environment variables that are passed to FastCGI applications. This command can be used multiple times

//--------------------------------------------- ----------//

# php.ini file location

FcgidInitialEnv PHPRC "C:/Progra~1/PHP"

//--------------------------------------------- ---------//

# Set PHP_FCGI_MAX_REQUESTS greater than or equal to FcgidMaxRequestsPerProcess to prevent the php-cgi process from exiting before processing all requests

FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000

//--------------------------------------------- ----------//

#windows path setting

FcgidInitialEnv PATH"D:/usr/local/php5;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"

//--------------------------------------------- --------//

#Operating system directory

FcgidInitialEnv SystemRoot "C:/Windows"
//------------------------------------------------ ----//

#systemdisk

FcgidInitialEnv SystemDrive "C:"

//--------------------------------------------- --------//

#Temporary folder

FcgidInitialEnv TEMP "C:/WINDOWS/TEMP"
//------------------------------------------------ ----//

#Folder to store temporary files

FcgidInitialEnv TMP "C:/WINDOWS/TEMP"
//------------------------------------------------ -----//

#Operating system installation directory

FcgidInitialEnv windir "C:/WINDOWS"

FcgidProcessLifeTime.

FcgidIOTimeout command
Description: FastCGI server communication timeout

Syntax: FcgidIOTimeout seconds

Default: FcgidIOTimeout 40

Environment: Server Configuration

Status: External

Corresponding old command: IPCCommTimeout

Fastcgi applications attempting to read or write will wait for the set time to do the work,

FcgidFixPathinfo command
Description: Mirror PHP cgi.fix_pathinfo setting

Syntax: FcgidFixPathinfo 1

Default: FcgidFixPathinfo0

Environment: Server Configuration

Status: External

Corresponding old command: PHP_Fix_Pathinfo_Enable

The pathinfo mode is not supported by default and only the normal url access mode is supported. If this command is used here, the settings in php.ini will be used, as follows:

cgi.fix_pathinfo=1

pathinfo mode refers to non-traditional URL access modes, such as pseudo-static, rewrite

FcgidMaxProcesses command
Note: The maximum number of processes for php-cgi

Syntax: FcgidMaxProcesses value

Default: FcgidMaxProcesses 1000

Environment: Server Configuration

Status: External

Corresponding old instruction: MaxProcessCount

This command sets the maximum number of FastCGI processes that can be activated at one time when running the program. The more RAM you have, the higher you can set the value.

FcgidMaxProcessesPerClass directive
Note: The maximum number of FCGI processes that each virtual host can open

Syntax: FcgidMaxProcessesPerClass value

Default: FcgidMaxProcessesPerClass 100

Environment: Server Configuration

Status: External

Corresponding old instruction: DefaultMaxClassProcessCount

The default is 100. Each virtual host can open up to 100 Fastcgi processes, that is, a single customer can have 100 PHP service requests at the same time. I would suggest values ​​from 8 to 20. NOTE: If there are more requests at the same time, they will be queued instead of rejected. (The size of the value cannot be greater than the value set by FcgidMaxProcesses)

FcgidMinProcessesPerClass directive
Description: Opposite of FcgidMaxProcessesPerClass

Syntax: FcgidMaxProcessesPerClass value

Default: FcgidMaxProcessesPerClass3

Environment: Server Configuration

Status: External

should always be 0

FcgidMaxRequestInMem directive
Description: The maximum size stored in memory for each request

Syntax: FcgidMaxRequestInMem bytes

Default: FcgidMaxRequestInMem 65536

Environment: Server Configuration

Status: External

This module reads the entire request body from the client and sends it to the application. Normally, the request body will be stored in memory. Once the amount of the request body read from the client exceeds the number of bytes set by FcgidMaxRequestInMem, the remainder of the request body will be stored in a temporary file.

FcgidMaxRequestLen command
Description: Maximum length of HTTP request

Syntax: FcgidMaxRequestLen bytes

Default: FcgidMaxRequestLen 131072

Environment: Server Configuration

Status: External

If the HTTP request size exceeds this amount, the request will fail and a 500 Server Error will occur. Error usually occurs when uploading files.

Warning: Before 2.3.6, the default was 1GB, and now the default is 128K. Users should use this command to set a more reasonable limit. For example, when I use 2.3.6, I should use this parameter to set it to upload larger files. data.

FcgidMaxRequestsPerProcess directive
Description: The maximum number of requests per php-cgi process

Syntax: FcgidMaxRequestsPerProcess value

Default: FcgidMaxRequestsPerProcess 0

Environment: Server configuration, virtual host

Status: External

The maximum number of requests handled by the FastCGI application process. A value of 0 disables checking.

FcgidOutputBufferSize command
Description: CGI output buffer size

Syntax: FcgidOutputBufferSize bytes

Default: FcgidOutputBufferSize 65536

Environment: Server configuration, virtual host

Status: External

Set the size of the cgi buffer.

FcgidProcessLifeTime command
Description: CGI process survival time

Syntax: FcgidOutputBufferSize bytes

Default: FcgidOutputBufferSize 65536

Environment: Server configuration, virtual host

Status: External

Existing PHP-CGI processes that are idle longer than this time will be terminated if the number of processes exceeds the setting of FcgidMinProcessesPerClass. A value of 0 disables checking. The lifetime of this process is checked at the frequency configured above the FcgidIdleScanInterval.

FcgidSpawnScoreUpLimit command
Description: Control value that allows the process to spawn speed

Syntax: FcgidSpawnScoreUpLimit value

Default: FcgidSpawnScoreUpLimit 10

Environment: Server Configuration

Status: External

Generate speed control value. When a process is spawned or terminated, this value will increase and decrease over time; when this value is higher than FcgidSpawnScoreUpLimit, the spawning process will stop for a while until the existing process is idle or The value of FcgidSpawnScoreUpLimit is lower than the set value. The higher this number is, the faster the build process will be.

FcgidSpawnScore command
Description: Weight of process generation speed

Syntax: FcgidSpawnScore value

Default: FcgidSpawnScore 1

Environment: Server Configuration

Status: External

Generate speed weights. For each process, this value is added to the spawn speed control value (FcgidSpawnScoreUpLimit). The larger this value, the faster the CGI generation speed.

FcgidTerminationScore command
Description: Increase the value of each terminated process activity

Syntax: FcgidTerminationScore value

Default: FcgidTerminationScore 2

Environment: Server Configuration

Status: External

Death weight. The larger this value is, the slower the CGI process will be generated.

FcgidTimeScore command
Description: Subtract the value of process activity every second (set value)

Syntax: FcgidTimeScore value

Default: FcgidTimeScore 1

Environment: Server Configuration

Status: External

The higher the value, the more productive the process will be.

FcgidWrapper command
Description: Setting the CGI program location

Syntax: FcgidWrapper command [ suffix ] [ virtual ]

Default: none

Environment: Server Configuration

Status: External

Generally used to specify the php-cgi path

LoadModule fcgid_module modules/mod_fcgid.so

FcgidWrapper "C:/Progra~1/PHP/php-cgi.exe"

FcgidZombieScanInterval command
Description: Scanning interval for zombie processes

Syntax: FcgidZombieScanInterval seconds

Default: FcgidZombieScanInterval 3

Environment: Server Configuration

Status: External

The time interval for scanning zombie processes.

FastCgi basic configuration
The following is a basic FastCgi configuration

Copy mod_fcgid.so to the modules folder under the Apache installation directory, open httpd.conf, and add the following content (any location):

LoadModule fcgid_module modules/mod_fcgid.so

AddHandler fcgid-script .fcgi .php

# php.ini file location

FcgidInitialEnv PHPRC "C:/Progra~1/PHP"

# Set PHP_FCGI_MAX_REQUESTS greater than or equal to FcgidMaxRequestsPerProcess to prevent the php-cgi process from exiting before processing all requests

FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000

#Maximum number of requests per php-cgi process

FcgidMaxRequestsPerProcess 1000

#Maximum number of processes for php-cgi

FcgidMaxProcesses 5

# Maximum execution time

FcgidIOTimeout 120

FcgidIdleTimeout 120

#php-cgi path

FcgidWrapper"C:/Progra~1/PHP/php-cgi.exe"

# Define the MIME-Type for ".php" files

AddType application/x-httpd-php .php

#Define the length of cgi request

FcgidMaxRequestLen 1500000

Attachment:
1. AddHandler command
Description: Establish a mapping between file extensions and specific processors

AddHandler fcgid-script .fcgi .php

The explanation of the above statement is: Once the above definition is placed in your http.conf file, all files containing .fcgi, .php extensions will be regarded as FCGID programs.

2. AddType Command
Description: Establishes a mapping between a given file extension and a specific content type

AddType application/x-httpd-php .php

The explanation of the above statement is: Once the above definition is placed in your http.conf file, all files containing the .php extension will be regarded as PHP type programs.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477366.htmlTechArticleFcgidBusyScanInterval command description: Scan busy timeout process interval syntax: FcgidBusyScanInterval seconds Default: FcgidBusyScanInterval 120 Environment: Server configuration status: External...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn