I've got a website project setup to use IIS Express from visual studio 2012. Once started it slowly uses up more and more memory on my development computer. Once I deploy it it seems to stay fairly steady though. Obviously there is a memory leak somewhere but since it doesn't seem to occur on the live server I'm not too worried about it, (and after days of trying to debug it I still haven't found it.)
On my development computer if I forget to turn it off overnight it eats up all the memory on my system and starts paging to disk. When I come in the next morning it takes a long time to even kill it because the OS has also been pushed into paged memory and is extremely sluggish.
Looking at the example on https://technet.microsoft.com/en-us/library/cc745955.aspx I figure I should be able to force the app pool to recycle itself when it hits the 3gig used level to avoid the problem.
I've gone into my C:\Users\username\Documents\IISExpress\config\applicationhost.config file and replaced the first application pool's section with the following:
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true">
<recycling>
<periodicRestart privateMemory="600000">
<schedule>
<clear />
</schedule>
</periodicRestart>
</recycling>
</add>
Unfortunately when my project is run it happily goes well past the 600,000KB limit I'm trying to impose on it without restarting. I've tried both the memory and the privateMemory attribute, both fail to do anything.
My project is set to use .NET v4.0 Integrated mode, and by messing with Microsoft.Web.Administration I'm fairly certain that my config changes are adjusting the right app pool and the recycle setting is loaded in my project, (but I'm new to that library so I'm not totally sure.)