Cache trimming occurs in an ASP.NET web application running in Internet Information Services (IIS)


Symptom


Consider the following scenario. You have an ASP.NET 4.0 web application running on a 64-bit version of Microsoft Windows. The web application is hosted in an Internet Information Services (IIS) worker process that is configured to run in 32-bit mode. The application pool is configured with a Private Bytes recycle limit of 0 (unlimited). In this scenario, you may see lots of cache trims occurring when the work process' private bytes usage reaches approximately 740 megabytes (MB). To alleviate the problem, you have to restart the application pool or unload the application domain.



Cause


Microsoft has confirmed that this is a bug in the product(s) listed in the Applies-To section.



Resolution


To work around this problem, configure the application pool's Private Bytes memory limit to be 4GB. A value of 4GB is effectively the same as the default value of 0 (unlimited) for the 32-bit application pool process running on the 64-bit operating system (wow64).



More Information


For more information on configuring application pool recycling for private bytes usage in IIS, please see the following links:


Configure an Application Pool to Recycle after Reaching Maximum Used Memory in IIS 7

PeriodicRestartPrivateMemory Metabase Property in IIS 6