MemoryCache Evictions Do Not Fire When Memory Limits Are Reached - by David Faivre

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


5
0
Sign in
to vote
ID 661340 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 4/14/2011 8:24:17 AM
Access Restriction Public

Description

Running in an Azure Worker Role, with mulitple thread access to the cache writes, the MemoryCache fails to evict cache items when memory size limits are reached.  If the worker role routine that uses the cache is called into from a WPF test harness, and the WPF Garbage Collection has concurrent GC turned off, then the evictions fire.  If concurrent GC is on, evictions don't fire.

Interestingly, running the worker role directly using dev fabric, setting the GC concurrency has no effect.  However, a periodic GC.Collect() and GC.WaitForPendingFinalizers() will trigger the evictions.

Please see the StackOverflow discussion for further details: http://stackoverflow.com/questions/5655439/net-4-memorycache-leaks-with-concurrent-garbage-collection
Sign in to post a comment.
Posted by Microsoft on 7/21/2011 at 8:10 AM
Thank you for submitting this issue. We have verified that the bug has been fixed in the next release of the .NET Framework.
Posted by Microsoft on 4/14/2011 at 9:14 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)