IIS7 -FastCGI -PHP White Screen of Death [Answered]RSS

4 replies

Last post Mar 10, 2009 08:49 PM by gusus

  • IIS7 -FastCGI -PHP White Screen of Death

    Mar 06, 2009 11:59 PM|gusus|LINK

    I am having an issue with IIS7 and PHP relating to clients receiving the white screen of death (blank page) after 90 seconds of processing.  Standard php processing works fine.  

    The following are set in php.ini:

    max_execution_time = 180
    max_input_time = 180
    memory_limit = 128M

    In the FastCGI configuration on IIS I have the following:

    ActivityTimeout 900
    IdleTimeout 300
    RequestTimeout 500

    I have a simple page that runs through loop and sleeps every 15 seconds.  If I set the max_execution_time to 30 seconds, I get the php execution time exceeded error as I should with two entries in the page. If I manually set_time_limit(0), it gives the white page of death.  I have set php logging and nothing appears in the log.  I intentionally put a syntax error to make sure and the syntax error was logged.  In addition, I can set the ActivityTimeout to 10 and IIS gives me a 500 error telling me that the FastCGI process exceeded the configuration activity timeout.

    The weird thing is the Failed Request Tracking show that the time taken was 30592 msec with a status of 200 (I assume success).  However, the last entry in the request trace is "FASTCGI_WAITING_FOR_RESPONSE"...

    Any ideas???

    PHP FastCGI IIS7 php fastcgi 500 IIS7 fastCGI Installation FastCGI process exited unexpectedly PHP IIS7 2008 PHP FastCGI extensions php fastcgi error iis7 fastcgi fastCGI error fastcgi module error 500 IIS 7.0 activitytimeout time limit timeout

  • Re: IIS7 -FastCGI -PHP White Screen of Death

    Mar 09, 2009 01:06 AM|anilr|LINK

    What was your failed request tracing rule?  My guess is that you set a rule with max execution of 30secs in which case, no event after 30s will be in the trace.  The best way to catch all events is to just use status-code 200-999 as condition for failure.  Your symptoms however indicate that the client is timing out.

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: IIS7 -FastCGI -PHP White Screen of Death

    Mar 09, 2009 09:19 PM|gusus|LINK

    Thank you for catching that.  Yes, my rule for the FRT was for 30 seconds.  I made the change you suggested but still not error.  The time taken is now 150135 msec, which is right for the code that I am running (For loop going 0-9, sleeping every 15 seconds). 

    The "GENERAL_RESPONSE_ENTITY_BUFFER" in the FRT shows the HTML that should be rendered, however the content in the browser is blank.  The browser stops processing after 90 seconds and shows a blank page.  Which I guess is correct because the script is still running...

    To eliminate my firewall, I ran the code from the server and it did the same thing (both IE and Firefox.)  Do you think this could have something to do with a setting in Server 08?  All users are experiencing this same issue, regardless of their location, inside or outside of the network.

     Thanks for your help.

  • Re: IIS7 -FastCGI -PHP White Screen of Death

    Mar 10, 2009 12:51 AM|anilr|LINK

    So, this does look like a browser timeout which you would have to configure at the browser.  People usually get around this sort of browser timeout by periodically sending a "wait for response" response while computing the final response.

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: IIS7 -FastCGI -PHP White Screen of Death

    Mar 10, 2009 08:49 PM|gusus|LINK

    Anil,

    Thank you for your assistance.  In my 10+ years of PHP development on Apache and IIS, I have never encountered an issue like this where all browsers (IE, Firefox, Chrome) all exhibit the same issue of showing a blank page after 90 seconds.  Technically, Chrome gives a message of "This website might be temporarily down or it may have moved permanently to a new web address."

    Your idea gave my an avenue to pursue and I have found a resolution to the issue.  The following posting helped also: http://forums.iis.net/t/1078563.aspx.

    For any others having this issue, I had to set the responseBufferLimit property to "0" on the FastCGIModule add line in the local web.config and the CGIModule add line in the applicationHost.config file.  I also had to turn "On" implicit_flush and set output_buffering to "0" in my php.ini file.

    Again, thanks for your help.