Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8913645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:30:49+00:00 2026-06-15T04:30:49+00:00

I have a php application running on IIS 7.5 , php 5.4 running as

  • 0

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 :

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

    if(sleep(1)!=0)
    {
        echo "sleep failed script terminating"; 
        break;
    }
}

?>

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.

Correct me if my presumptions are wrong but would it be fair to say that if a script times out the browser will get an error where as if a script is killed off by IIS before completion then nothing is returned to the browser and you get a what looks like a hang as far as the browser is concerned?

fastcgi

activity timeout=800 Idle Timeout = 900 request Timeout 800

Php

max_execution_time=700
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:30:51+00:00Added an answer on June 15, 2026 at 4:30 am

    If a long running script doesn’t communicate with the browser , after 180 seconds or so most browsers will become unresponsive to the server returning the results. The server script wasn’t hanging or being terminated, it was the browsers (ie,ff and chrome) becoming unresponsive.

    To check this , I ran my script and watched the status of the request.
    IIS manager-> select the server-> select worker processes(central pane)->select the application pool-> select view requests (right hand pane) and watched the status and time elapsed columns. You will have to repeatedly click “show all” to see the values updating.

    The state changed from ExecuterequestHandler to Sending response and then the script finished as it should but the browsers still looked like they were waiting for the server to respond.

    I updated my test script from the above to this to ensure the browsers were being fed responses regularly:

    <?php 
    @ini_set("output_buffering", "Off");
    @ini_set('implicit_flush', 1);
    @ini_set('zlib.output_compression', 0);
    @ini_set('max_execution_time', 800);
    
    
    header( 'Content-type: text/html; charset=utf-8' );
    
    
    echo "Testing time out in seconds\n";
    for ($i = 0; $i < 600; $i++) {
        echo $i." -- ";
    
        if(sleep(1)!=0)
        {
            echo "sleep failed script terminating"; 
            break;
        }
        flush();
        ob_flush();
    }
    
    ?>
    

    The output was’t coming back to the browsers bit buy bit as it should and the problem remained.

    Next step , I looked at response buffering on the server. The setting was set to a very high number and meant that flushing wouldn’t work. So I set ResponseBufferLimit to 0 as per the instructions provided by @Dario in PHP flush stopped flushing in IIS7.5

    This solved the problem 🙂 If this solution has helped you please visit the above question and give Dario another +1 from me please, and maybe one to the OP for his question and script.

    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Php application running on my Server A that consumes a .NET
I have a PHP web application (running on Apache/Linux) that, among other things, allows
I have a currently running PHP application that I want to add real-time feed
I have a PHP web application running on IIS, which allows a user to
I have a PHP application running on a Micrisoft IIS 7 server. The application
I have a php application that uses the google feed api to get the
I have a PHP application that I have been having some problems with, some
I have a php application that is installed on several servers and all of
I have a PHP application that sends email using the pear Mail function. Unfortunately
I have a PHP application that is built around the MVC architecture without any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.