This is an issue I've had twice now over a couple of months. Basically I've gotten a call saying our site is giving an HTTP error 503, I take a look at the IIS7 Manager and notice the AppPool has switched itself off. I restart it and it continues happily on it's way until a few months latter it happens again.
The IIS manager is handling four sites, both times this issue occurred on the same site. The .NET Framework version being used is v4.0.
Looking at the event log I see the following
Web Server IIS:
Warning: Event 5011 "A Process serving the application pool 'foo' suffered a fatal communication error with the Windows Process Activation Service. The process id was 'X' The data field contains the error number." - This warning appears 5 times, with 5 difference values for X, this takes place over about a minute 10-15 seconds between each warning.
Error: Event 5002 "Application pool 'foo' is being automatically disabled due to a series of failures in the process(es) serving that application pool."
Application log:
Error: Event 1000: "Faulting application name: w3wp.exe, version 7.5.7601.17514, time stamp: 0x4ce7afa2.
Faulting module name: clr.dll version 4.0.30319.17929, times tamp: 0x4ffa59b1. Exception codeL 0x0000fd"Information: Event 1001 "Fault bucket, type 0
Event Name: APPCRASH Response: Not available"
The above two events occur over the same time period, first the error followed by two information events. This occurs five times and lines up with the warnings from the web server log.
If anyone can clarify what is going on it would be much appreciated. I'd rather not be worrying that our site is going to disappear from the web because the application pool decided to switch itself off.
I know that the Rapid Fail Protection (which causes the switch off after a given number of failures) can be switched off, but I'd rather deal with the underlying issue.
Turned out the problem was with PDF4Net, as revealed by the crash dump from the app pool. The link How to debug w3wp clr.dll error (Posted by MikeSmithDev) outlines that process.
Anyway a pdf with one extremely tiny page came along which would then get stamped by a transparent image. This would create a stack overflow error which when multiple attempts were made to access the file would result in the app pool shutting down. Turned out the fix was just a matter of updating PDF4Net.