Wednesday 20 May 2015

Understand Process Model In Application Pool IIS

Title: Cause of “application pool exceeded time limits during shut down”.
Event Log: A process serving application pool 'xxxx' exceeded time limits during shut down. The process id was 'xxxx'.

Each web site (and potentially each web application) is IIS is linked to an application pool that holds configuration of the hosting process.

Several of these properties are linked to how the process is recycled (terminated and restarted). By default, each application will be terminated every 1740 minutes (29 hours) but it can also be recycled if it's unused for (again, by default) 20 minutes, if it fails to answers to "ping" (actually, health monitoring beats). Other limits can be placed by the administrator.

When the application is recycled, the container process is shut down. It has (by default) 90 seconds to shut down properly or it will be forcibly closed.

So, the cause of your issue is that one of the recycling limits for your web app is reached, causing IIS to try to terminate it. Unfortunately, the application fails to shut down in time, causing that (temporary) error 500.

Now, there is another aspect: if you application "fails" (i.e. sends back a server error) more than (by default) 5 times in a period of 5 minutes, it will be shut down by IIS and remain down until you manually restart it.

All this points to an error in your application code. Talk to the supplier of that code and they will help you diagnose the exact issue.