Link to home
Start Free TrialLog in
Avatar of AblSysadmin
AblSysadmin

asked on

IIS long garbage collection times

we have been getting Dynatrace alerts reagrding Long Garbage collections that suspend the app pools on our IIS servers.

Usually what we would do to resolve the issue was to recycle the app pool.

We need to know how can you check if an app pool is suspended, and how to check which objects need are taking the most time during the garbage collection?
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

- What language is the app written in?  C#, VB.NET?
- What version of the .NET Framework?

When GC starts taking a long time, you have a code issue, somewhere.  You can use Sysinternals ProcessExplorer to view the specific AppPool's process (w3wc.exe) .NET resource utilization.

If the process is utilizing a .NET Framework, you will have a .NET Performance Tab when viewing the properties of an active process.

Here is a good article on tracking down GC issues:

Link:  https://www.red-gate.com/simple-talk/dotnet/asp-net/how-the-garbage-collector-can-cause-random-slowness/

Here is an article on measuring the impact of GC on a process:

Link:  http://mattwarren.org/2014/06/18/measuring-the-impact-of-the-net-garbage-collector/

As for checking to see if an AppPool is suspended... you can use PowerShell to get the state of an AppPool.  You need to use the WebAdministration PowerShell Module.  This gives you access to various commands that allow you to work with IIS.

One of the commands you would be interested in is:  Get-WebAppPoolState

Reference link:  https://technet.microsoft.com/en-us/library/hh867899(v=wps.620).aspx

Dan
Avatar of AblSysadmin
AblSysadmin

ASKER

the .NET framework version is 4.0

The application is written in C#

I will have a look at the articles referenced and provide feedback.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.