Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Worker process taking high CPU%

Tags:

asp.net

iis

pool

All of my websites are hosted in IIS and configured with one application pool. This application pool consists 10 websites running.

It is working fine till today, but all of sudden I am observing that there is sudden up and down % in CPU usage. I am unable to trace out the problem.

Is there anyway to check which website is taking much load among all in the application pool?

like image 619
max Avatar asked Feb 02 '26 21:02

max


1 Answers

Performance counters, task manager and native code analysis tools only tell part of the story. To gain a deeper understanding of what is happening inside your ASP.NET application you need to use WinDBG, SOS and ADPlus.

Tess Ferrandez has a great series of articles on tracking down what is to blame here:

.NET Debugging Demos Lab 4: High CPU hang
.NET Debugging Demos Lab 4: High CPU Hang - Review

This is a real world example:

High CPU in .NET app using a static Generic.Dictionary

You will probably want to separate your sites into individual application pools so you can identify and isolate the site that is causing the high CPU (but it already looks like you have a suspect so I'd isolate that one). From then you can follow Tess's advice and guidance to track down the cause.

You should also take a look at the logs to see if you're experiencing an unexpected spike or increase in traffic. Perhaps there's a badly behaved search engine site indexer nailing the site. If that's the case then maybe you need to (if you haven't already done so) create a robots.txt to prevent crawlers from indexing parts of the site that don't need to be indexed. On top of that if certain crawlers are being overly promiscious then just ban them. Perhaps consider a sitemap for google to tame and tune its activities.

like image 50
Kev Avatar answered Feb 05 '26 11:02

Kev