一、服务器iis7跑dedecms在后台生成栏目静态时出错:
HTTP 错误 500.0 - Internal Server Error
E:\Program Files\php\php-cgi.exe - FastCGI 进程超过了配置的活动超时时限
网上一搜,解决方案如下:
使用%WINDIR%\system32\inetsrv\appcmd.exe list config /section:fastcgi /text:*获得当前配置
CONFIG
CONFIG.SECTION:"system.webServer/fastCgi"
path:"MACHINE/WEBROOT/APPHOST"
overrideMode:"Inherit"
locked:"false"
[system.webServer/fastCgi]
[application]
fullPath:"E:\Program Files\php\php-cgi.exe"
arguments:""
maxInstances:"4"
idleTimeout:"300"
activityTimeout:"30"
requestTimeout:"90"
instanceMaxRequests:"200"
protocol:"NamedPipe"
queueLength:"1000"
flushNamedPipe:"false"
rapidFailsPerMinute:"10"
[environmentVariables]
使用appcmd set config -section:system.webServer/fastCgi /[fullPath='E:\Program Files\php\php-cgi.exe'].activityTimeout:600
将超时时限改成10分钟(最大可以设到1小时)
可是报错:
ERROR ( message:找不到带有标识符“Files\php\php-cgi.exe'].activityTimeout:600”的 SITE 对象。 )
所有搜到的中文网站php-cgi.exe的路径都没有空格,但是我的偏偏就有,执行不了。
最后跑到老外的网上找到了解决办法:%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI "/[fullPath='E:\Program Files\php\php-cgi.exe'].activityTimeout:600"
二、
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='C:\php\php-cgi.exe'].activityTimeout:600
如果还是不行,请查看IIS应用程序池,可以改为默认(DefaultAppPool)。
三、
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='C:\php\php-cgi.exe'].activityTimeout:600
查看当前配置
%windir%\system32\inetsrv\appcmd list config -section:system.webServer/fastCgi
都是在cmd下运行
也可以在C:\Windows\System32\inetsrv\config\applicationHost.config 进行编辑