0

My environment: Windows Server 2008, IIE 7.0, ASP.NET

I developed a Silverlight client. This client gets updates from the ASP.NET host through a WCF web service.

We get 100% CPU usage and connection drops when we have a very low number of users (~50). The server should clearly be able to handle a lot more than that.

I ran some tests on our DEV server and indeed 100 requests / s maxes out the CPU. What's odd is that even if the service is replaced by a dummy sending back hardcoded data the service still maxes out the CPU. The thread count looked very low at about 20 so I thought there was some contention somewhere.

I changed all configuration options I could find to increase the worker threads (processModel, httpRuntime and the MaxRequestsPerCPU registry entry). Nothing changed.

Then I stopped the IIS server and ran the web service as a console (removing all the ASP authentication references). The service maxed out the CPU as well.

Then comes the magic part: I killed the console app and restarted IIS and now the service runs a 5-60% CPU with 100 requests / s and I can see 50+ worker threads. I did the same thing on our preprod machine and had the same magic effect. Rebooting the machines keeps the good behaviour.

So my question is: what happened to fix my IIS server? I really can't understand what fixed it.

Cheers.

Mathew Thompson
  • 55,877
  • 15
  • 127
  • 148
R4cOOn
  • 2,340
  • 2
  • 30
  • 41

1 Answers1

1

Find out the root cause of the high CPU usage, and then you can find a fix,

http://support.microsoft.com/kb/919791

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • Thanks for the link. I looked around but couldn't find a tool that was useful like that. In the end the issue was that there was an EventLog writer in the EntLib logging block that wasn't registered and was throwing loads of exceptions each time it was trying to write (it was also misconfigured to write too many entries). – R4cOOn Feb 10 '11 at 09:58