PHP failing on IIS [Answered]RSS

1 reply

Last post Oct 14, 2015 02:35 AM by Pengzhen Song - MSFT

  • PHP failing on IIS

    Oct 13, 2015 01:02 PM|PlatformAdmin|LINK

    I am up against an issue whereby PHP is failing in a way that leaves the php-cgi.exe processes running, but they no longer take requests. The maxInstances of PHP is consumed and requests result in an HTTP 500 error.  When this condition occurs, I will begin seeing very long request times in the IIS log (in the order of minutes) and then eventually all requests immediately result in a 500 error.  The Failed Request Tracing logs capture the following errors during the sequence: FASTCGI_REQUEST_TIMEOUT, then FASTCGI_RAPID_FAILURE_PROTECTION, and finally FASTCGI_APPLICATION_MANAGER_SHUTDOWN.   Resetting IIS temporarily resolves the issue. Any insight would be greatly appreciated.

    Relevant PHP settings are as follows:

    PHP version 5.6.12

    maxInstances = 30 (we have 4 cpu)

    intanceMaxRequests = 1000

    PHP_FCGI_MAX_REQUESTS = 1000

    php

  • Re: PHP failing on IIS

    Oct 14, 2015 02:35 AM|Pengzhen Song - MSFT|LINK

    Hi,

    I suggest that you can enables FastCGI to optimize MaxInstances itself if you set MaxInstances=0. In IIS 7.5 we can make FastCGI module capable of monitoring system state and adjust this number dynamically to give best possible performance. This feature is referred to as dynamic maxInstances or auto maxInstances and can be enabled by setting maxInstances value to 0.

    And you can try to increase activitytimeout and requesttimeout value:

    https://technet.microsoft.com/en-us/library/dd450377(v=ws.10).aspx

    php

    We are trying to better understand customer views on social support experience. Click HERE to participate the survey.
    Thanks!