Browsing Tag

timeout

WordPress Tutorials

Increase request timeout for IIS 6 with FastCGI module

September 21, 2017

If you are hosting PHP on IIS (Windows Server) using FastCGI, there is case that you meet script timeout issue even the max_execution_time value in php.ini is high enough. The error is as below screenshot

The reason is that FastCGI module has its own timeout setting. In IIS7, it’s called ActivityTimeout and you can configure in IIS > FastCGI Settings > Activity Timeout

However, in IIS 6, there isn’t an option like that. To change the request timeout, you can go to C:\Windows\System32\inetsrv\config, open ApplicationHost.config. You will find this section

<fastCgi>
<application fullPath=”…\php-cgi.exe”/>
</fastCgi>

What you need to do is to add activityTimeout parameter to the module, like this

<fastCgi>
<application fullPath=”…\php-cgi.exe” activityTimeout=”3600″/>
</fastCgi>

Now restart your IIS, it will work!