Configuring IIS Timeouts
The following instructions are intended for running Zend Server with PHP FastCGI on Windows.
Issue:
The default timeout settings for FastCGI, may cause runtime failures for scripts that run longer than 30 seconds.
Resolution:
If you know that you have scripts that run more than 30 seconds set your FastCGI and PHP to a longer script timeout duration.
FastCGI Settings:
This procedure describes how to change your FastCGI timeout settings according to webserver type and version.
- IIS 7:
In applicationHost.config locate the following:
<fastCgi>
<application fullPath="C:\Program Files (x86)\Zend\ZendServer\bin\php-cgi.exe" maxInstances="10" instanceMaxRequests="10000" >
<environmentVariables>
<environmentVariable name="PHPRC" value="C:\Program Files (x86)\Zend\ZendServer\etc" />
<environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000" />
</environmentVariables>
</application>
</fastCgi>
-
And change the following values:
activityTimeout="<Number of Seconds>"
requestTimeout="<Number of Seconds>"
PHP Settings
This procedure describes how to configure your PHP's execution time.
|
|
|
To configure your PHP's execution time:
|
Scripts that run more than 30 seconds but less than <Number of Seconds> should now run. See below for instructions on how to test this. |
Testing the Changes
The following procedure shows how to run a short script that checks if the settings have been properly applied.
|
|
|
To test your settings:
<?php sleep(40); echo "If you see this text the script completed and the defaults were changed";. ?>
|
If the test failed you will not see a message in your browser. In that case try restarting your webserver and running the script again. |