5

High CPU

The picture explains it all. We have had a problem with an IIS MVC 5 website hosted on Microsoft Azure over the last several months. The site appears to continually eat up CPU over a few days until it reaches 100% CPU. I have used Perfmon/DebugDiag to capture what is going on when the server hits 100% with no positive findings. I've also monitored IIS worker processes to see if it is any one particular request hanging, but all requests are being processed quickly (until 100%). Grasping at straws - we have had peer checks of code to ensure no bad loops/string concats are occurring.

My guess is this has something to do with the garbage collector... Resetting the app pool fixes the issue (for a few days).

Any insight would be appreciated as to how to debug this further. I have followed this Microsoft article without success: http://www.iis.net/learn/troubleshoot/performance-issues/troubleshooting-high-cpu-in-an-iis-7x-application-pool

Thanks.

1 Answers1

0

Garbage collection is typically memory related, not CPU related. Of course, you could have objects that have routines in them that are looping and those objects are slowly growing or the time between loop iterations are decreasing. Yes, you need to profile your processes as this would tell you which methods are causing all of the CPU time. I recommend Telerik's JustTrace tool, although there are many others out there.

One other thought, you may think you have disposed of your object but the loop is still running. Consider terminating your loops gracefully with a cancellation token or condition.