I'm responsible for the servers OS and firewall and network. The IIS is hosting an ASP.net solution. the IIS queries the backend ERP (SQL 2005). I haven't anything to do with the Website and don't have any knowledge about it.

Yesterday we had serious problems since the w3wp.exe process took 100% cpu. There were 60 users accessing the web site. I killed the process but it went to 100% again in few seconds. Restarted the machine but it went to 100% again.

Then I changed the settings for application pools so the w3wp.exe is stopped when it reach 50% cpu. It seemed to help keeping the site stable.

Question 1: I would like to know if this application pool change has any impact for the users accessing the site? Are they experiencing any drop-outs, missing transactions or anything?

Question 2: Why did the w3wp.exe process go to 100%? (Is the hardware to small? or is it bad code in the application? or stupid configured queries against the SQL server?

Question 3: I think 39 ms reply on ping is slow (but not sure). can a slow reply affect the w3wp.exe process?

You should check the scripts you edited the last days before the w3wp.exe began to hang up! There seems to be a script that is doing an endless loop for example. Or maybe you are not closing and/or releasing an object correctly? Check your scripts in detail at first!!

Could be also an third party component (activex dll) you are using! Maybe you implemented such a component?

If you limit the cpu time, IIS could handle fewer request than before when reaching the limit.

You should think about expanding the RAM cause windows is using a big part of it for its services and things.

SQL 2005 is running on a different server I think. If not, you definitly need more RAM or should transfer SQL Server to another server!

You can hang up the iis process with only one user calling a endless loop, at least for a while. If there are more users calling a script with an endless loop the process could hang up as in your case.

IIS is very sensitive for bad written code or non closed connections, objects and so on.

I recently hung up one application and iis 6.0 with classic asp with a third party script,cause the author did not destroy all objects (recordsets and connections)! And this application has only up to 10 concurrent sessions ;)

OK thanks. I don't know if there are any endless loop. How can i find out. The site seems to work ok when only a few users are on. What actually happens when a user user calls a script with an endless loop? Will the user experiense anything? any errors to look for in logfiles?

That is the problem! You can not detect any endless loop or non closed object within any log! You have to look at your code manually! Its a annoying to check the whole code, but in most cases it is the only way to fix this.

What happens is that IIS can not handle more than a number of requests at the same time. And if you are calling an endless loop the script "hangs" a least for the time you specified in script timeout. While this happens IIS can not server other requests. Or if the number for max. requests at a time is calling an endless loop.

You could raise the number of concurrent requests, but it would not help because this will consume mor ressources and after a while maybe these extra requests are running on the same error.

I would try to check my code and see if there is anything I can fix. Look for all "do...while", "do...until", "for...next" and check if your objects are closed and destroyed. Do not rely on garbage collector in ASP(.NET)! ;)

I have looked in the IIS log and can count the users that way. But when the CPU went 100% and a lot of users couldn't load the page, would the connections still be logged in the IIS log or do we have no chance to tell how many users was trying?

Good question. Normally the requests are recognized, but not processed. If there is a log entry I never looked for.

I do not think there will be a log entry on every request, cause the log entires will report success or failure. If the requests are timing out there will be a log entry. If the requests will result to a 403 or whatever error status, they wil be logged, but if they are not processed correctly there will be no entry in log.

NO! As I said, please check your scripts and components! There is an error within them I think and there is no way arround sighting all scripts!

With better hardware you will only delay the 100% cpu effect! I am sure it will happen again. I am administrating IIS since Windows 2000 release for arround 7 to 8 years now, and in most if not alll cases a bad code was the source of these types of problems.

Foreword (May 2015)
This web page has appeared at Google. It's definitely worth considering!
https://www.google.com/about/careers/students/guide-to-technical-development.html
How to Know You are Making a Difference at EE
In August, 2013, one …

Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…