Configuring IIS Timeouts

In this Topic Hide

FastCgi Settings:

PHP Settings

Testing the Changes

 

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.

        <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>

PHP Settings

This procedure describes how to configure your PHP's execution time.

 

 

Instructions on how to complete a procedure

To configure your PHP's execution time:

  1. In Zend Server go to Server Setup | Directives
  2. Edit the value of the following directives:
  3. Change max_execution_time to <Number of Seconds> and max_input_time to<Number of Seconds>
  4. Restart PHP

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.

 

 

Instructions on how to complete a procedure

To test your settings:

  1. Open a text editor and insert the following code:

<?php

sleep(40);

echo "If you see this text the script completed and the defaults were changed";.

?>

  1. Run the script from your docroot, if the script suceeded to run you will see the following message in your browser "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.