Reputation: 53
I'm working on an MVC 3 site which is hosted in Windows Azure that is configured to use the DistributedCacheSessionStateStoreProvider for session state which, in turn, uses Azure caching internally. The cache is configured as:
<dataCacheClients>
<dataCacheClient name="default">
<hosts>
<host name="test.cache.windows.net" cachePort="XXXX" />
</hosts>
<securityProperties mode="Message">
<messageSecurity authorizationInfo="XXXX">
</messageSecurity>
</securityProperties>
<transportProperties receiveTimeout="45000" />
</dataCacheClient>
</dataCacheClients>
The session provider is configured as
<sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
<providers>
<add name="AppFabricCacheSessionStoreProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" useBlobMode="true" />
</providers>
</sessionState>
We've had this in place since April but just recently started using the session to store a little bit more data. Our test caching service is 128 MB, which is said to allow 5 concurrent connections. The most we've used of this service at any given time, according to the Azure management console, is 0.34 MB.
In our logs we're seeing this exception appear quite often:
ErrorCode:SubStatus:There is a temporary failure. Please retry later. (The request failed, because you exceeded quota limits for this hour. If you experience this often, upgrade your subscription to a higher one). Additional Information : Throttling due to resource : Connections
According to the documentation I've read, the data cache client by default has maximum connections set to 1. I'm running on two instances, which I assume would mean I'm using two total connections.
Please help me understand what I'm doing wrong and what I can do to resolve this problem.
Upvotes: 5
Views: 991
Reputation: 71028
You're not throttled just on storage usage. You're also throttled on transactions per hour and bandwidth per hour. For a 128MB cache:
Might you be running into one of these two boundary conditions?
For more details around AppFabric Cache SLA, look at this MSDN blog post.
Upvotes: 1