Reputation: 10134
I have a large (as in many pages, objects...) asp.net web app that pegs the server at 100% at times for no reason that i can tell. is there a way to detect what page is at fault?
I know its asp.net and not sql because task manager shows w3wp.exe as the culprit.
are there tools for doing this? or profiling .net web apps?
Upvotes: 4
Views: 616
Reputation: 43207
ASP.Net Tracing is the answer.
http://www.asp101.com/articles/robert/tracing/default.asp
http://www.asp.net/general/videos/how-do-i-implement-tracing-in-an-aspnet-web-site
(source: asp101.com)
Upvotes: 2
Reputation: 29801
If you can repeat the issue on a test server or you own machine you can use a profiler (the one included in Visual Studio 2010 or any other) to figure out what's happening.
If the problem only occurs in production you probably are best off performing a dump of the process when the problem is occuring and analyze it using DebugDiag.
Tess Ferrandez has lots of information on her blog on how to perform low level analysis of application behaviour on her blog as well, including how to use DebugDiag.
Upvotes: 0
Reputation: 14703
Check out this Red Gate product: http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/
It's not trivial to master, though.
Upvotes: 2
Reputation: 2841
You wouldn't by chance happening to be using GC.Collect()
in your web app would you? Excessive calls to GC.Collect()
for large applications will cause it to spike to 100% as it scans memory to look for disposable objects. If you call GC.Collect()
in rapid succession, you would likely get a continuous 100% cpu usage when memory usage is high.
Upvotes: -1