locked
FastCGI process exceeded configured activity timeout RRS feed

  • Question

  • User808724780 posted

    I am trying to find out where this value is configured!

    Win2003 x64, fully patched.
    FastCGI v2, with special bits via Rick James to make it work with UNC paths
     

    I can't get long running scripts to go more than 30 seconds. We have a few data conversion pages that will run for 1-3 minutes using slow cgi (point directly to the exe). It doesn't seem to be in the fcgiext.ini file, I set it to 600 seconds there and restarted IIS. After 30 seconds the error I get is

    FastCGI Handler Extension


    Error 0x80070102 occurred processing request.

    The FastCGI process exceeded configured activity timeout
    Friday, February 16, 2007 8:43 PM

All replies

  • User-679828332 posted

    Hi jchertudi,

    I made the following change to php.ini:

    max_execution_time = 90

    Then the following changes to fcgiext.ini:

    RequestTimeout=90
    ActivityTimeout=60

    Then recycled the AppPool in question (currently config change notifications are not supported)

    and then requested a page that calls sleep( 59 )


    Everything worked as expected.

    Cheerz,

    Rick.

    Monday, February 19, 2007 1:11 PM
  • User803529499 posted

     How does one configure the activity timeout when using Perl? Is there also a php.ini file when doing FastCGI with Perl?

    Monday, November 5, 2007 6:04 PM
  • User-2067655963 posted

    I've run into a similar problem.  I set ActivityTimeout=900 in fcgiext.ini, then restarted IIS, and I'm still getting the activity timeout:

    Error Number: 258 (0x80070102).

    I'm running the 32-bit "intermediate release": 7.0.6001.16606 (LH_SRV_IIS(wadeh).070322-1011)

    I'm using PHP 5.2.4-nts.  I've double-checked the timeout settings in php.ini, and they look fine.  Here's my current fcgiext.ini:

    [Types]
    php=PHP

    [PHP]
    ExePath=C:\PHP\php-cgi.exe
    InstanceMaxRequests=10000
    EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000
    RequestTimeout=500
    ActivityTimeout=900

    Any suggestions on how to fix this would be appreciated.

     

    Thursday, November 8, 2007 6:47 AM
  • User-679828332 posted

    Hi AceNZ,

    ActivityTimeout controls home long FastCGI will wait for PHP before giving up. Is the PHP script taking longer than 900 seconds to run?

    Thanks,

    Rick.

    Thursday, November 8, 2007 7:34 PM
  • User-2067655963 posted

    Sorry I wasn't more clear.

    As with the original poster, FastCGI times out after 30 seconds with an Activity Timeout error, regardless of how high I set the ActivityTimeout parameter.

     

     

    Thursday, November 8, 2007 8:35 PM
  • User-679828332 posted

    Hi AceNZ,

    I wonder if the correct config is getting used.. If you deliberately mess up your system32\inetsrv\fcgiext.ini config file do you see an error?

    If not and you're using x64, there's an issue where the wrong .ini file is sometimes read. Could you try the latest (http://www.iis.net/default.aspx?tabid=1000057) and see if that solves the problem?

    Thanks,

    Rick.

    Thursday, November 8, 2007 9:19 PM
  • User-2067655963 posted

    I messed up the fcgiext.ini file and restarted the app pool.  No errors were displayed in IE when I went to a PHP page.

    However, I'm running 32-bit Win 2K3, not x64.  In addition, I'm already running the "Intermediate Release" on the page that you mentioned, which I believe is the latest release.

    EDIT: problem solved.  Although the DLL and the INI were located in the inetsrv directory, IIS had been configured to load the DLL from c:\php, due to a permission problem of some kind.  The files weren't removed from inetsrv, so when the config file there was changed, it had no effect, since it was getting loaded from the same folder as the DLL.  Once the files in inetsrv were removed and the INI in c:\php updated, everything seems to be working fine.

    Thanks for the lead -- it helped me start looking in the right direction!

    Thursday, November 8, 2007 11:14 PM
  • User159332807 posted

    I had similar problems with timeouts on PHP, but I am using IIS 7.0 which doesn't have a fcgiext.ini. It turns out that the FastCGI configuration is now in main IIS XML configuration, modifying fcgiext.ini would make no difference.

    Here is how to set the configuration with IIS 7.0:

    <tt>%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='C:\php\php-cgi.exe'].activityTimeout:600</tt>

    You need to change the '<tt>C:\php\php-cgi.exe</tt>' to the actual location PHP that you registered with IIS.

    If you want to make double-check that the configuration worked properly, you can check it like this:

    <tt>%windir%\system32\inetsrv\appcmd list config -section:system.webServer/fastCgi</tt>

    You should see output similar to the following:

    <tt><system.webServer>
      <fastCgi>
        <application fullPath="C:\php\php-cgi.exe" activityTimeout="600">
          <environmentVariables>
          </environmentVariables>
        </application>
      </fastCgi>
    </system.webServer></tt>

    Thursday, June 19, 2008 1:37 AM
  • User-2010224204 posted

    EDIT: problem solved.  Although the DLL and the INI were located in the inetsrv directory, IIS had been configured to load the DLL from c:\php, due to a permission problem of some kind.  The files weren't removed from inetsrv, so when the config file there was changed, it had no effect, since it was getting loaded from the same folder as the DLL.  Once the files in inetsrv were removed and the INI in c:\php updated, everything seems to be working fine.

     

    I have similar issue on my server. I think that your solution could work for me too. Can you explain what you mean with removing files from inetsrv? Did you moved them into c:\php? Sorry, I am newbie with world of IIS =o).

    Friday, August 29, 2008 2:25 PM
  • User-2067655963 posted

    I have similar issue on my server. I think that your solution could work for me too. Can you explain what you mean with removing files from inetsrv? Did you moved them into c:\php? Sorry, I am newbie with world of IIS =o).

    c:\windows\system32\inetsrv is where IIS lives, and is where FastCGI was originally installed.

    Yes, I moved the files from there to c:\php, and configured IIS to load the DLL from there instead of the default.

    Friday, August 29, 2008 4:36 PM
  • User-2010224204 posted

    c:\windows\system32\inetsrv is where IIS lives, and is where FastCGI was originally installed.

    Yes, I moved the files from there to c:\php, and configured IIS to load the DLL from there instead of the default.

     

    Thanks for your quick answer. Couple of questions to make me sure what I am really doing;

    1) Do I have to move ALL the files from inetsrv to c:\php? Is there difference between copying or moving them - so, can I just copy them?

    2) You mean that dll is fcgiext.dll and the FastCGI path is after configuration c:\php\fcgiext.dll

    Friday, August 29, 2008 5:34 PM
  • User-585678730 posted
    Hi. I have the same problem and still find no solution. I tried all advices I found, but nothing helped. What's wrong? Please, somebody, help!)) I feel I'm going crazy.
    Tuesday, September 16, 2008 4:51 PM
  • User1694634321 posted
    I'm having problems with PHP on Windows when using WHMCS panel, almost everything that I use returns timeout error.
    I am using Windows 2003, PHP with FastCGI and has set a longer time even more so return error.

    What could be?

     

    Saturday, February 21, 2009 3:14 PM
  • User-1705871467 posted

    hex, what os / version of iis are you running? what ver of php? need more details.

     works good on iis7 w/ admin pak and setting php timeout in iis admin. 

    Wednesday, March 18, 2009 6:55 PM
  • User1171956341 posted

    If you are increasing the value in fcgiext.ini, you have to specify it in the bottom section below the [PHP] header.  If you just uncomment it in the top part, it will not work.

    Just my experience from trial and error.  You may need to Recycle the Application Pool for the settings to be applied.
    Monday, April 13, 2009 10:11 AM