php FastCGI 进程超出配置的活动超时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 
原文地址: http://stackoverflow.com/questions/14902554/
Warning: these are provided under cc-by-sa 4.0 license.  You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
FastCGI process exceeded configured activity timeout
提问by David Biga
I have a function I built that will grab a .csv file and upload information stated then, creating an account for each user in the .csv file.
我有一个我构建的函数,它将抓取一个 .csv 文件并上传当时说明的信息,为 .csv 文件中的每个用户创建一个帐户。
My issue is I need to be able to do this with thousands of entries in a .csv file but my problem is I get this time out error and not to sure why, as follows:
我的问题是我需要能够使用 .csv 文件中的数千个条目来执行此操作,但我的问题是我收到此超时错误并且不确定为什么,如下所示:
HTTP Error 500.0 - Internal Server Error
c:\php-fastcgi\php-cgi.exe - The FastCGI process exceeded configured activity 
                             timeout
Detailed Error Information
Module -
FastCgiModule
Notification - 
ExecuteRequestHandler
Handler - 
PHP_via_FastCGI
Error Code -
0x80070102
Here is my CSV function:
这是我的 CSV 函数:
http://jsfiddle.net/fS4t4/- this is in PHP and I just throw it into the javascript section.
http://jsfiddle.net/fS4t4/- 这是在 PHP 中,我只是将它放入 javascript 部分。
How to fix this?
如何解决这个问题?
UPDATE: My provider is Winhost
更新:我的提供商是 Winhost
采纳答案by Dave Lasley
Go to %windir%\system32\inetsrv\fcgiext.iniand locate the ActivityTimeout parameter; copy it into the [php] section. Change the parameter to whatever value you would like, and also make sure that it is not commented out. Restart IIS and you should be good.
转到%windir%\system32\inetsrv\fcgiext.ini并找到 ActivityTimeout 参数;将其复制到 [php] 部分。将参数更改为您想要的任何值,并确保它没有被注释掉。重新启动 IIS,你应该很好。
activityTimeoutcan be also set (IIS7 and above) from the IIS Manager under the server/IIS/FastCGI Settings/Edit.
activityTimeout也可以从服务器/IIS/FastCGI 设置/编辑下的 IIS 管理器设置(IIS7 及以上)。
回答by momo
activityTimeoutcan be also set (IIS7 and above) from the IIS Manager under the server/IIS/FastCGI Settings/Edit.
activityTimeout也可以从服务器/IIS/FastCGI 设置/编辑下的 IIS 管理器设置(IIS7 及以上)。
回答by icedwater
For Windows Server 2008 R2, the default version of IIS that is supplied is IIS 7.5. The solutionDave suggested will not work because that file isn't there.
对于 Windows Server 2008 R2,提供的 IIS 的默认版本是 IIS 7.5。Dave 建议的解决方案不起作用,因为该文件不存在。
Instead, try %windir%\system32\inetsrv\config\applicationHost.configto set up the options for the entire server. Look at the <fastCgi>block:
相反,尝试%windir%\system32\inetsrv\config\applicationHost.config为整个服务器设置选项。看<fastCgi>块:
<fastCgi>
    <application fullPath = "C:\php\php-cgi.exe" arguments = "" 
        monitorChangesTo = "" stderrMode = "ReturnStdErrIn500" maxInstances = "4"
        idleTimeout = "300" activityTimeout = "30" requestTimeout = "90" 
        instanceMaxRequests = "5000" protocol = "NamedPipe" queueLength = "1000" 
        flushNamedPipe = "false" rapidFailsPerMinute = "10">
        <environmentVariables>
            <environmentVariable name="PHP_MAX_REQUESTS" value="5000" />
        </environmentVariables>
    </application>
</fastCgi>
Remember to restart your webserver.
请记住重新启动您的网络服务器。
I set the activityTimeoutto 90 and requestTimeoutto 270 to give processes more time to finish their work. This wasn't enough for my problem, but it should at least allow people to find the relevant bits on IIS 7.5.
我将 设置activityTimeout为 90 和requestTimeout270 以给进程更多的时间来完成他们的工作。这对于我的问题还不够,但它至少应该允许人们在 IIS 7.5 上找到相关位。
回答by Aashis Binod Khanal
For IIS 7.5you can change the setting of file in
对于IIS 7.5,您可以更改文件的设置
C:\Windows\System32\inetsrv\config\applicationHost.config
C:\Windows\System32\inetsrv\config\applicationHost.config
and find the line below and change as per your requirement
并找到下面的行并根据您的要求进行更改
<fastCgi>
    <application fullPath="C:\PHP\php-cgi.exe" idleTimeout="900" activityTimeout="180" requestTimeout="10000" instanceMaxRequests="10000" />
</fastCgi>
DO NOT FORGET TO RESTART SERVER
不要忘记重新启动服务器
ORThis can be done from UI too:
或这也可以从 UI 完成:
Open InetMgr (window+R type Inetmgr and hit enter)


