生产环境 服务器基于Windows 2008,并使用cgi php模式,但是当请求频繁出现时,所有Web都会变慢 . ping时间大约是3秒 .
We use thinkphp, any other reasons result in the problem ?
我想将php模式从cgi更改为fastcgi,可能会更好 . 这是我做的:1 . 下载mod_fcgid.so,并将其放在模块目录中 . 2 .
LoadModule fcgid_module modules/mod_fcgid.so
我应该在下面评论这一行吗?
LoadModule cgi_module modules/mod_cgi.so
3.config它 .
AddHandler fcgid-script .fcgi .php
# Where to look for the php.ini file?
FcgidInitialEnv PHPRC "c:/php"
# Set PHP_FCGI_MAX_REQUESTS to greater than or equal to FcgidMaxRequestsPerProcess
# to prevent php-cgi process from exiting before all requests completed
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
# Maximum requests a process should handle before it is terminated
FcgidMaxRequestsPerProcess 1000
# Maximum number of PHP processes
FcgidMaxProcesses 15
# Number of seconds of idle time before a php-cgi process is terminated
FcgidIOTimeout 120
FcgidIdleTimeout 120
#Path to php-cgi
FcgidWrapper "c:/php/php-cgi.exe" .php
# Define the MIME-Type for ".php" files
AddType application/x-httpd-php .php
Options Indexes FollowSymLinks ExecCGI
Order allow,deny
Allow from all
AllowOverride All
我做得对吗?有人可以给我一个计划吗?之后,我重新启动服务器,但失败了,错误的错误代码1.有人能帮帮我吗?
1 回答
您似乎在使用Windows,但mod_fcgid.so适用于Linux
你应该下载mod_fcgid.dll而不是mod_fcgid.so
你可以在这里下载:http://www.fastcgi.com/drupal/?q=node/3注意:Win32 DLL-1.3 / 2.0