views:

515

answers:

2

My problem is that sometimes the CPU usage on the webserver is going to 100% (caused by the W3wp.exe)

At that moment the website will become "service unavailable"

Question: Where can I check from the IIS/HTTPERR logs where the website became "service unavailable"?

Can I used Log Parser to identify at which time this is happening? If yes is there any query?

Thank You

+1  A: 

You could create a user dump file for the process and use the debug diagnostics tool to analyze what happened. The tool is part of the IIS Diagnostics Toolkit (download and description here). It is located in the folder C:\Program Files\IIS Resources\DebugDiag.

This support article explains in detail how to do that:

How to use the Debug Diagnostics Tool to troubleshoot high CPU usage by a process in IIS

splattne
A: 

Dunno if this is any food for thought, but this is what we do:

When our page rendering goes over a certain acceptable threshold we mark the server as "busy" and all future new sessions are denied "Server busy" - that lets people with open sessions finish up, lighten the load, and free up resources for creation ofnew sessions to resume

We do this by recording average task duration each minute, and checking if the average over the last five minutes exceeds the threshold - then set the Busy flag. The flag will be cleared on the next recalculation (which is a task scheduled for one-minute interval) when the 5-minute moving-average falls below threshold again.

Kristen