Iis – w3wp.exe using 50% CPU time when website is not doing anything

cpu-usageiisiis-7windows-server-2008

I've got a Windows Server 2008 running IIS 7 with a number of different website each with there own application pool.

Occasionally each one of these sites will fire up a w3wp.exe process when nobody is viewing the website and use about 50% of the CPU resources.

Does anyone know the reason for this and is there a way to stop this or at least reduce it as it slows down the response times on other websites that are being used.

All the websites are asp.net MVC applications running .NET 4 and MVC 2 or 3.

Thanks

Best Answer

I would first verify that the application domainis not restarting. Sometimes this is due to files that are changing.

Add this to your master web.config located at:

C:\WINDOWS\Microsoft.NET\Framework\<version>\CONFIG or
C:\WINDOWS\Microsoft.NET\Framework64\<version>\CONFIG 

<add name="Application Lifetime Events Default" eventName="Application Lifetime Events"
    provider="EventLogProvider" profile="Default" minInstances="1"
    maxLimit="Infinite" minInterval="00:01:00" custom="" />

http://blogs.msdn.com/b/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#686393