The FastCGI process exceeded configured activity timeout [Answered]RSS

9 replies

Last post Feb 01, 2010 05:36 PM by kehand

  • The FastCGI process exceeded configured activity timeout

    Jul 26, 2008 01:41 AM|canadaka|LINK

    I was trying to do a phpbb3 conversion, but the script keeps timing out. I can't figure out how to increase the PHP timeout on IIS7.

    I tried adding the following code to the PHP script itself: ini_set('max_execution_time',6000);

    I tried increasing the FastCGI "RequestTimeout" to 6000 via the IIS7 tool provided with the admin pack. I also confirmed that this change was taking place in the applicationHost.config.

    <fastCgi>
    <application fullPath="C:\Program Files\PHP\php-cgi.exe" requestTimeout="6000" instanceMaxRequests="10000" />
    </fastCgi>

    I also increased the sites "Connection time-out" to 6000. yet the script keeps timing out in a reletively short period of time, maybe 30 seconds max. This is the error produced.

    HTTP Error 500.0 - Internal Server Error

    C:\Program Files\PHP\php-cgi.exe - The FastCGI process exceeded configured activity timeout

    Module FastCgiModule
    Notification ExecuteRequestHandler
    Handler PHP via FastCGI
    Error Code 0x80070102

  • Re: The FastCGI process exceeded configured activity timeout

    Jul 26, 2008 02:44 AM|ksingla|LINK

    Seems like you are running into activity timeout which defaults to 30 seconds and not request timeout. You can try increasing that.

    -Kanwal-

  • Re: The FastCGI process exceeded configured activity timeout

    Jul 26, 2008 03:03 AM|canadaka|LINK

    where is that? general IIS, fastCGI setting or PHP setting?

    I did a search in applicationHost.config for the word "activity" and nothing was found, same with php.ini

    I remember in IIS6 in FCGIext.ini there was an "ActivityTimeout" variable, but I don't know what it would be in IIS7. 

  • Re: The FastCGI process exceeded configured activity timeout

    Jul 26, 2008 05:30 PM|ksingla|LINK

    "activityTimeout" is a FastCGI module setting in IIS. If you use the FastCGI UI, you will see it there. Your fastCGI section in appHost config will look something like

    <fastCgi>
      <application fullPath="<path>" arguments="<args>" activityTimeout="<value"> ...<otherValues>.... />
    </fastCgi>

    -Kj

  • Re: The FastCGI process exceeded configured activity timeout

    Jul 30, 2008 10:22 PM|canadaka|LINK

    thanks.

    But how can one set different activityTimeout's for different sites? Say i have one site that sends newsletters and the script takes minutes to run, so it will need a high activityTimeout. but i don't want this high value across my entire server, because thats bad right? Could waste resources on slow loading scripts.

  • Re: The FastCGI process exceeded configured activity timeout

    Jul 31, 2008 01:16 AM|ruslany|LINK

    You can use the approach similar to the one described in this article http://learn.iis.net/page.aspx/208/#Per-site (look for the section "Per-site PHP process pools")

    The configuration will looks similar to this:

    <fastCgi>
      <application fullPath="C:\PHP\php-cgi.exe" arguments="-d my.website=site1" activityTimeout="<value1>"  />
      <application fullPath="C:\PHP\php-cgi.exe" arguments="-d my.website=site2" activityTimeout="<value2>" />
    </fastCgi>

    The for each web site define a handler mapping for PHP as below:

    Site1:

    <system.webServer>
        <handlers accessPolicy="Read, Script">
            <add name="PHP via FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\PHP\php-cgi.exe|-d my.website=site1" resourceType="Unspecified" requireAccess="Script" />
        </handlers>
    </system.webServer>

    Site 2:

    <system.webServer>
        <handlers accessPolicy="Read, Script">
            <add name="PHP via FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\PHP\php-cgi.exe|-d my.website=site2" resourceType="Unspecified" requireAccess="Script" />
        </handlers>
    </system.webServer>

    FastCGI php fastcgi IIS7 fastCGI Installation

  • Re: The FastCGI process exceeded configured activity timeout

    Jul 31, 2008 05:29 AM|canadaka|LINK

    hmm ok thanks, i might do this.

    But I am thinking this might be a bit to maintain and I still can't do it per script with this. Might be a better option to set a relatively high value for the fastCGI timeout then set the php.ini timeout to a lower value. then use the ini_set('max_execution_time',VALUE); command when i need a specific script to have a long timeout.

    I am just wondering if there are any concerns with having a long timeout for the fastcgi value?

  • Re: The FastCGI process exceeded configured activity timeout

    Dec 05, 2009 12:13 PM|businessavenue|LINK

     I myself am trying to change the setting in fcgiext.ini, but one problem the IIS 7 does not seem to have the .ini file. Instead it has a .dll file only in:

    Current path: c:\windows\system32\inetsrv

    I have tried searching for the file in other foldiers. There are not c:\php foldier as some forums have suggested and the fcgiext.dll file does not have the settings which Im looking for or any other setting.

     Pls advise what do do?

  • Re: The FastCGI process exceeded configured activity timeout

    Jan 09, 2010 06:36 AM|jbsymmetricgroup|LINK

     What is wrong with the default time-out times? if a php script can not be proccessed in milliseconds in a test enviroment with 0 load, wouldnt that mean that iis and fastcgi are simply hanging or there is some other issue going on with iis? nobody should wait 30 or more seconds for a page to be displayed.

  • kehand kehand

    70 Posts

    Microsoft

    Re: The FastCGI process exceeded configured activity timeout

    Feb 01, 2010 05:36 PM|kehand|LINK

    businessavenue

     I myself am trying to change the setting in fcgiext.ini, but one problem the IIS 7 does not seem to have the .ini file. Instead it has a .dll file only in:

    Current path: c:\windows\system32\inetsrv

    I have tried searching for the file in other foldiers. There are not c:\php foldier as some forums have suggested and the fcgiext.dll file does not have the settings which Im looking for or any other setting.

     Pls advise what do do?

     

     

    Hi,

    IIS 7 does not using the ini configuration system. You will have to change the configuration settings for the FastCGI applications as directed in the article here: http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/

    The configuration can be changed via either Inetmgr (the UI) or appcmd (a command-line tool found in %windir%\system32\inetsrv).

    The configuration file (applicationhost.xml) can be found in for %windir%\system32\inetsrv\config for server level configurations. There is also a web.config at the root of your site for any site-level configuration settings.

    HTH,

    kehand