IIS7.5 + FastCGI issuesRSS

5 replies

Last post Mar 02, 2018 03:24 AM by Yuk Ding

  • IIS7.5 + FastCGI issues

    Feb 01, 2018 07:45 PM|JuanMdP|LINK

    Greetings,

    I've made a thread a few weeks on another subforum, I'm not opening this one here as spam but because I think it's better suited to the subforum and also because I have more information that may help in shedding some light on something that honestly flies above my head. My experience with servers is very basic, I've never had to worry aside from configuring minimal aspects and since I never had issues I never had to worry about it much. That is until the institution I work at acquired a real server with Windows Server 2008 R2. The stability of our PHP app has been... worrysome, to say the least. In comparison, this used to run on a regular PC and it never had issues, which makes this situation all the more baffling. Anyway, that small introduction out of the way, having monitored the event logs I run into a lot of errors with the following culprits:

    Log Name: Application
    Source: Application Error
    Date: 01/02/2018 02:34:29 p.m.
    Event ID: 1000
    Task Category: (100)
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: <computername>
    Description:
    Faulting application name: php-cgi.exe, version: 5.5.38.0, time stamp: 0x578fc02c
    Faulting module name: kernel32.dll, version: 6.1.7601.23572, time stamp: 0x57fd0378
    Exception code: 0xc0000005
    Fault offset: 0x00011380
    Faulting process id: 0x15ec
    Faulting application start time: 0x01d39b6fdbbf5925
    Faulting application path: C:\Program Files (x86)\PHP\v5.5\php-cgi.exe
    Faulting module path: C:\Windows\syswow64\kernel32.dll
    Report Id: 2767b2e8-0776-11e8-ab09-842b2b771d30

    When I was notified that the site was unresponsive the first thing I tried was to recycle the appPool, that derived in the following errors:

    Log Name: Application
    Source: Microsoft-Windows-IIS-W3SVC-WP
    Date: 01/02/2018 02:53:29 p.m.
    Event ID: 2281
    Task Category: None
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: <computername>
    Description:
    The worker process failed to initialize communication with the W3SVC and therefore could not be started. The data is the error.

    Log Name: Application
    Source: Microsoft-Windows-IIS-W3SVC-WP
    Date: 01/02/2018 02:53:29 p.m.
    Event ID: 2276
    Task Category: None
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: <computername>
    Description:
    The worker process failed to initialize correctly and therefore could not be started. The data is the error.

    In the end, there was no other choice but to restart IIS; the only viable "solution" to whenever we run into these issues. A few minutes after that restart though these two other errors also popped up on the event log:

    Log Name: Application
    Source: Application Error
    Date: 01/02/2018 03:07:09 p.m.
    Event ID: 1000
    Task Category: (100)
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: <computername>
    Description:
    Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
    Faulting module name: iisfcgi.dll, version: 7.5.7601.17514, time stamp: 0x4ce7b85c
    Exception code: 0xc0000005
    Fault offset: 0x000070d3
    Faulting process id: 0xfe8
    Faulting application start time: 0x01d39b85912f4014
    Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
    Faulting module path: C:\Windows\System32\inetsrv\iisfcgi.dll
    Report Id: b78de2f6-077a-11e8-ab09-842b2b771d30

    Log Name: Application
    Source: Application Error
    Date: 01/02/2018 03:07:49 p.m.
    Event ID: 1000
    Task Category: (100)
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: THEGLORIOUS
    Description:
    Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
    Faulting module name: iisfcgi.dll, version: 7.5.7601.17514, time stamp: 0x4ce7b85c
    Exception code: 0xc0000005
    Fault offset: 0x000070d3
    Faulting process id: 0x27c
    Faulting application start time: 0x01d39b877f608768
    Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
    Faulting module path: C:\Windows\System32\inetsrv\iisfcgi.dll
    Report Id: cfbdccb0-077a-11e8-ab09-842b2b771d30

    At the same time, the custom view for IIS on the event log registered the following warnings (x4):

    Log Name: System
    Source: Microsoft-Windows-WAS
    Date: 01/02/2018 02:53:28 p.m.
    Event ID: 5013
    Task Category: None
    Level: Warning
    Keywords: Classic
    User: N/A
    Computer: <computername>
    Description:
    A process serving application pool 'DefaultAppPool' exceeded time limits during shut down. The process id was '2252'.

    Those errors, along with a few instances where I get the infamous "the fastCGI process exited unexpectedly" have been the bane of my Life since migrating on December. The PHP version we are running is 5.6, IIS is 7.5, the basic configuration for the appPool is set to Net Framework v4 for the Net Framework version and Integrated for the managed pipeline mode. Needless to say, I'm at a total loss, any kind of pointers or suggestions will be extremely appreciated.

  • Re: IIS7.5 + FastCGI issues

    Feb 02, 2018 09:26 AM|Yuk Ding|LINK

    Hi JuanMdP,

    Here is the similar case with fast cgi 0xc0000005 crash:

    https://forums.iis.net/t/1200936.aspx?w3wp+exe+crash+faulting+module+iisfcgi+dll+

    php.ini is the root cause for this issue. Please try to disable monitor file setting in fastcgi and keep monior.

    In addition, please ensure you have set php in IIS following this link:

    https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configure-a-php-website-on-iis

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: IIS7.5 + FastCGI issues

    Feb 02, 2018 11:59 AM|JuanMdP|LINK

    Hello,

    Thanks for the tip, is clearing the field for Monitor Changes to File enough or is there a specific place where you disable this option? I did the former but if it's actually the latter let me know and I'll do it. I'll be monitoring the app to see how it performs.

    Thanks again for the pointer.

  • Re: IIS7.5 + FastCGI issues

    Feb 06, 2018 08:39 AM|Yuk Ding|LINK

    Hi JuanMdP,

    Can you load the simple PHP page via a new website? If this issue only occur on the specific application, then you need to check the PHP code.

    Otherwise, you need to check whether the php extension has been loaded correctly or reset the IIS configuration following this link:

    https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configure-a-php-website-on-iis

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: IIS7.5 + FastCGI issues

    Feb 06, 2018 02:23 PM|JuanMdP|LINK

    Hi Yuk,

    I'm not sure what you mean; the issue I'm experiencing happens site wide. Not just a page and not always. Just... seldomly. After what you suggested last week it acted a lot more stable but today something happened again. It's as if the app runs out of memory and suddenly it fails to load all PHP libraries. Restarting the server fixes that issue but that's not an ideal solution.

    The odd thing is that I didn't get any kind of error event this time. My PHP settings have been configured based on Microsoft's page so it's not that. Same goes for IIS and the fastCGI settings.

    Thanks.

  • Re: IIS7.5 + FastCGI issues

    Mar 02, 2018 03:24 AM|Yuk Ding|LINK

    Hi JuanMdP,

    It looks like there is a memory leak in your PHP application. So please troubleshooting your application itself. IIS or fast-cgi itself should not cause this issue.

    Best Regards,

    Yuk DIng

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.