Appfabric strange behavior

88 Views Asked by At

I've got a windows service hosting a WCF service running on machine A. It retrieves objects from machine B running Appfabric where the actual objects are stored. Machine B has 2 regions, "Articles" and "TestArticles". The live application uses Articles and my test program uses TestArticles.

It has been running for six months without problems but now suddenly the live application starts returning null for some objects until the service is restarted and all objects are cached again. Then it runs for a few hours and null's are being returned again. Eviction and TTL is not used so objects should stay in there forever. The only things I can think of is that the Appfabric server's memory is almost full. Only 43MB of 12GB is free!

So what I would like to know is what happens when an Appfabric server's memory is full and I try to cache more objects in the TestArticles region. They succeed but does Appfabric throw out objects from Articles then?

1

There are 1 best solutions below

4
stuartd On

The Eviction Troubleshooting page has this to say:

A Windows Server AppFabric cache cluster uses eviction to control the amount of memory that the Caching Service uses on a cache host. Eviction occurs during two scenarios:

The available physical memory on the server is critically low.

The Caching Service's memory usage exceeds the high watermark for the cache host.

The Expiration and Eviction page also says:

To maintain the memory capacity available for cache on each cache host, AppFabric supports least recently used (LRU) eviction.

So, when your server runs out of memory, you should see LRU eviction.

There is no way to set the eviction policy per-region, so you would be better off either using different servers for live and test: or, if that isn't an option, create two caches - one for live and one for test - and set the test cache to evict.