W3WP at 100% CPU

  • Thread starter Thread starter Helge
  • Start date Start date
H

Helge

I'm developing a web site with asp.net, mainly vb on a Windows 2003 server.
Quite often the web site stops responding for 15-20 seconds.
A web page that usually take 2 seconds to produce takes forever.
During this time,the w3wp process takes 100% of the CPU time.

I'm using only asp.net, no extra stuff like Commerce server or anything.

Please? Any clues or help would be much appreciated!

Helge
 
This type of issue really takes being there at the console to track down
the cause. First places to look:

1) Any loops in your code that do not use the foreach() construct. Is
there an infinite loop problem?

2) Does the page consistently take 15-20 seconds to come up on each
view? If so, what is the page doing during this time? Are you
performing "expensive" parsing of strings, XML, serializing datasets, etc.?

3) If the slowness happens intermittently, when does it seem to happen
most often? During peak usage? Are there resource contention issues
between pages trying to read/write to the same data on the drive?

4) Are you performing XSLT transformations on the web server that are
transforming large sets of XML? This recursion can appear like an
infinite loop problem but ultimately the server recovers after the XSLT
completes.

5) Are you performing any sort of resource intensive encrypts/decrypts
of data on the server?

6) If the above fails to reveal the problem, you might try wiring up
WMI in your ASP.NET page to write instrumentation data to a logfile so
you can capture which method call is consistently causing the CPU spike.
That will give you a great place to look but takes the up front time
to set this up and roll to production. In some shops, that process can
be more arduous than chasing down the issue ad hoc in prod when the
problem occurs.

Hope this helps.

Jason
 
Bump...

This exact same thing happens to me consistantly with the exact same
equipment/software. Has a hotfix been developed for this? I've trimmed my
page down to barebones and still the issue occurs.
 
Hot fix for what? Having the same symptoms as someone else doesn't mean you
have the same disease. Generally speaking, this doesn't happen. Thereofre,
it must be caused by something else (other than ASP.Net). If, indeed, you
have "trimmed my page down to barebones and still the issue occurs" you
might want to check other software and/or services running on the machine.
The most likely candidate would be anti-virus software. But it might also be
some other security-related software, or even something else altogether,
such as a hack attack (give me a few hours and I might be able to think of a
half-dozen alternatives).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
Back
Top