I'm a bit of nube when it comes to configuring IIS 7.5 and Php so apologies if this is a silly question but I've been wrestling with this for over half the day and need some fresh input.

I have a php application running on IIS 7.5 , php 5.4 running as fastcgi. The application works absolutley fine with the exception that long running php scripts seem to hang; no 500 error they simply seem never complete and return the results to the browser.

I've written a simple test script below to eliminate the possibility of programming error in the main app :

/* test timeout */
echo "Testing time out in seconds\n";
for ($i = 0; $i < 175; $i++) {
    echo $i." -- ";

        echo "sleep failed script terminating"; 


If I run the script beyond 175 seconds it hangs. Below that it will return the results to the browser.

Here are the time out parameters that I've set for php and fastcgi. I've also played around setting these really low in order to get various time out errors and have succeeded which brings me to the conclusion that there's another setting that I'm missing .. perhaps.


activity timeout=800 Idle Timeout = 900 request Timeout 800



Any solutions or pointers in the right direction would be very ... very welcome.



It's been a long time since I've dealt with it, but you need to increase the CGI timeouts in IIS as it will simply kill the PHP process if it runs too long.

  • Just checked the default cgi timeout and it's set to 15 minutes which is way over whats needed. I'm trying to get it to not fail above 175 seconds at the moment. – Rich Nov 23 '12 at 0:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.