IIS 7 and Above
w3wp.exe is taking 100% CPU Usage
Last post Jul 02, 2012 05:58 PM by Rovastar
Jun 30, 2012 02:54 PM|rajesh.s.singh|LINK
Jun 30, 2012 04:24 PM|peterviola|LINK
Use Log Parser which is free to download from Microsoft and run queries on the web site's log files to see if any http errors are occurring and see which page requests are taking the longest to run. This will quickly identify which pages to focus your attention.
For example I've see 100% cpu spikes caused by typos in custom 404 subroutines. This site has has all the examples you need for this analysis:
Additionally you could setup a user defined data collector in Performance Monitor for 15-20 minutes during the cpu spike. Choose the Performance template. This will offer great insight in to the server operation as a whole.
As a reference here is the guide on configuring application pool recycling.
Jul 02, 2012 03:14 AM|Lloydz|LINK
To add to what above said, I would suggest you check the following article which could be helpful for you:
Troubleshooting High CPU in an IIS 7.x Application Pool
Jul 02, 2012 05:58 PM|Rovastar|LINK
The problem is in your code not the IIS settings.
The IIS setting for the app pool to recycle will not solve the problem only mask it.