Take the 2-minute tour ×

I have an intermittently occurring problem with my application. It is always under relatively high load (10-50 req/second). Most of the time it runs fantastic, with CPU < 10%. Occasionally (about once per week) it will suddenly ramp up to 100% CPU over the course of about 3 minutes and then stay there causing the server to become unresponsive until I kill the w3wp.exe. I'm continuing to try to debug this problem. In the mean time I need a temporary solution.

Is there a service or tool I can use to monitor the w3wp.exe and automatically kill the process if it goes above 80% utilization for a period of time?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

IIS can take care of this by itself; you can configure an application pool to be recycled (i.e. restarted) when its CPU usage stays above a certain threshold for a given period of time.

share|improve this answer
Thanks, I'm going to give that a try. For the record this setting can be found under Application Pools -> Select Pool -> Advanced -> CPU. –  Joshua Aug 9 '10 at 6:02
add comment

I don't know if you have other machines in your environment, but I'd suggest putting some monitoring in. Nagios or Zabbix or an application like that. They can monitor cpu / disk space / memory usage/ etc etc... if your cpu usage stays over 80% or 90% for whatever amount of time you deem too long you could then have that monitoring system fire off a job (zabbix is able to do this, call external items) to kill that pool. With this solution there is a bit of a learning curve however, you would need to learn the application and to write a script to do the app pool restart... something like a .net app or a vb script that uses IIS app to determine the application pool responsible and then a command line kill on that process.

share|improve this answer
add comment

Your Answer


