Search code examples
asp.net-mvciis-7.5windows-server-2008-r2application-pool

Application Pool Goes Down Very Often and Needs Recycling


I have a C# ASP.NET MVC application (MVC V.4 & .NET Framework 4.5)
running on a Windows Server 2008 R2 S.P.1 Datacenter as an application pool and in the last month has started going down every 3 days and the pool needs recycling to go up again.
A month ago was going down very rarely, like every 4-5 weeks and suddenly this has changed. I haven't changed anything on the Server nor any other kind of update. The C: Disk is 50% empty.

The IIS Server version is 7.5 and below you can see some details from the Applications Pool:
enter image description here

I see something on the application pools that based on my logic seems a little weird, which is the .NET Framework Version which is v4.0 but on my project is v4.5. But this was like that even one or two months ago.

Any idea on what could have caused this sudden change on the frequency of my web-app going down so frequently?


Solution

  • The value of application pool .NET Version is just the version of .NET runtime instead of .Net framework version. The description has been modified to .NET CLR version in IIS 10. So v4.0 is the correct CLR version for your .net 4.5 web app.

    enter image description here

    To figure out why application pool goes down, you need to check following things.

    1.What's the symptom of IIS goes down? IIS hang? crash? or just fall asleep?

    2.How many request are hang in your worker process? What error message did you see when you access the website?

    3.If the worker process exist, how's the call stack inside the process? You could research this by reviewing dump file.

    4.Please check your IIS log to find the last succeed request and the first broken request.

    Since this issue is complicated, more enough would help us figure out the root cause.

    Edit:

    1. When your application pool goes down. You could access the website again and monitor the symptom

    2. You could enable worker process monitor in Add role and feature->web server->health and diagnostics->Request monitor. Then you will see it in IIS manager->server node->worker processes. Click the site name will tell you how much concurrent requests are there in your application pool

    3. You could collect dump file with debug diagnostic tool https://www.microsoft.com/en-us/download/details.aspx?id=58210 or procdump. To analyze dump file, you could use WIN10 SDK WINDBG and mex extension. If you are not dump analysis expert, you could try debug diagnostic tool analysis

    4. You could find IIS log in C:\inetpub\logs\LogFiles. If the request was blocked on http.sys side, you could check C:\Windows\System32\LogFiles\HTTPERR.