AppFabric Caching Tip: Watch Your Memory Usage
Caching uses memory. Depending on how things are set up and how much data is stored, your caching structure can use up quite a bit of RAM.
AppFabric Caching is no different.
One fairly common development scenario is when you run SQL Server on the same machine as AppFabric. On rare occasion, this may result in memory problems as SQL Server has the tendency to hold onto memory once it’s acquired. I imagine a conversation between a Windows Server and SQL Server would go something like this:
Windows Server: Hey, SQL Server, how much memory do you need?
SQL Server: How much have you got?
You can control how much memory is used through configuration but a SQL Server in its default configuration, as most developers use it, may create issues.
Sometimes you may see an exception like this:
Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0007>:There is a temporary failure. Please retry later. (The request failed because the server is in throttled state.)
You can use
Get-CacheClusterHealth command in PowerShell to check the status of your Caching cluster. Here’s an example of the output for a healthy cluster:
If there are memory issues, you will often see a value other than zero in the
Since caching relies on availability of system memory, it’s a good idea to watch memory usage and try to control how much is used by applications such as SQL Server.
Here’s an MSDN article regarding troubleshooting throttling issues: http://msdn.microsoft.com/en-us/library/ff921030.aspx