Reputation: 1866
So my server has been going a bit crazy lately, every now and then my IIS thread would eat up 100% of my CPU and hang until I restart it.
I've done a dump and found the culprit ASPX page, however, I do not know how to figure out further from there what's going on.
Obviously I've done something very wrong - so is it possible to see where in the code are the threads running when IIS begins eating up my CPU?
Thanks, Ron
Upvotes: 4
Views: 1857
Reputation: 1339
In order to see what code the threads are executing, you will need the symbols (.pdb files) that match the code that was running. You will also need to set up symbols for the .NET Framework/Windows dlls. This KB covers how to do that: http://support.microsoft.com/kb/311503
The WinDbg tool and SOS.dll debugging extension allow you to find the threads that have the highest CPU !runaway
, and you can then inspect the stack !clrstack
. Tess has a great demo showing how to use this to track down a high CPU thread here: http://blogs.msdn.com/b/tess/archive/2008/02/22/net-debugging-demos-lab-4-high-cpu-hang.aspx
Upvotes: 1
Reputation: 40746
Recently, I was in the same situation: I wanted to measure what's going on on my live production server.
Having asked the question also in the Red Gate's ANTS Profiler forum, I got a great reply from the developers:
Basically the pointed me to the Early Access Program (EAP) version of version 7 of ANTS Profiler. This one has a feature that they call "continuous profiling" which basically does a live trace of a IIS worker process.
Upvotes: 0
Reputation: 66641
This is usually when you make a close loop - something like.
function int ThisOne(int SomeVar)
{
return SomeVar+1;
}
function int ThisOne(int ? SomeVar)
{
// here you try to call the ThisOne(int SomeVar),
// but you call him self and crash
return SomeVar == null ? 0 : ThisOne(SomeVar);
}
Other way to make this error that also make a close loop and crash
public string sMyText
{
get {return sMyText;}
set {sMyText = value;}
}
Similar questions: How do I crash the App Pool?
IIS crashes and restarts without dropping a mini-dump
Upvotes: 0