Iis – How to i diagnose IIS pushing the CPU to 100% usage

asp.netcpu-usageiisiis-6

I have a web server with more than a few ASP.NET sites running on it. Every so often, i notice that IIS is pushing the server's CPU to 100%. The sites share application pools, per .NET version they are running.

What i'm looking for is a way to be able to pinpoint which site it is that is doing this, using some tool. If that tool happened to get down into the code to show it, that would also be nice. If not, i'm happy just knowing which site is causing the issue.

I've already tried using ANTS. However, with ANTS you need to know which site it is, and then have it running and waiting on said CPU-crashing web app. Not perfectly ideal.

Any experience/ideas?

Best Answer

Some people consider a good practice, create an app pool per website/application, so that when you need to restart a website it will not affect the others. In the same way, it will create a new IIS worker process w3p.exe per website and by doing so i believe you could monitor more easily each my site was peaking the cpu.

Then to watch in details the CPU usage, you can for instance use Process Explorer from Miscrosft Sysinternal http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx which is a great free tool where you can gather the info you're lookin at.

Hope my tip helps in some way troubleshoot the IIS issue.