简体   繁体   中英

FastCGI process exceeded configured activity timeout

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.

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:

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:

http://jsfiddle.net/fS4t4/ - this is in PHP and I just throw it into the javascript section.

How to fix this?

UPDATE: My provider is Winhost

也可以在服务器/ IIS / FastCGI设置/编辑下的IIS管理器中设置activityTimeout (IIS7及更高版本)。

Go to %windir%\\system32\\inetsrv\\fcgiext.ini and 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.

activityTimeout can be also set (IIS7 and above) from the IIS Manager under the server/IIS/FastCGI Settings/Edit.

For Windows Server 2008 R2, the default version of IIS that is supplied is IIS 7.5. The solution Dave suggested will not work because that file isn't there.

Instead, try %windir%\\system32\\inetsrv\\config\\applicationHost.config to set up the options for the entire server. Look at the <fastCgi> block:

<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 activityTimeout to 90 and requestTimeout to 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.

For IIS 7.5 you can change the setting of file in

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

OR This can be done from UI too:

Open InetMgr (window+R type Inetmgr and hit enter) 从运行命令打开inet管理器

在inet管理器中过滤快速CGI

双击或单击编辑fastcgi

修改fastcgi设置

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM