Reputation: 6752
I have an asp.net web application hosted using Azure Websites that uses Azure Managed Cache to retrieve and store cached objects. The application was working fine until recently when we started experiencing timeouts and errors:
ErrorCode:SubStatus:The connection was terminated, possibly due to server or network problems or serialized Object size is greater than MaxBufferSize on server. Result of the request is unknown.. Additional Information : The client was trying to communicate with the server: net.tcp://foo.cache.windows.net:22233.
and
ErrorCode:SubStatus:The request timed out.. Additional Information : The client was trying to communicate with the server: net.tcp://foo.cache.windows.net:22233
Looking at the stack trace of both errors they all point to the cache.Get("key")
line, so I am not sure why it's saying serialized Object size is greater than MaxBufferSize
. Furthermore, looking at the monitor tab of the Caching object shows the Avg Size in bytes of 204 KB (max 215), meaning that it is not hitting the MaxBufferSize of 8 MB allowed by Azure. Unless, that is not the default value.
The code is very straight forward:
DataCacheFactory cacheFactory = new DataCacheFactory();
myCache = cacheFactory.GetDefaultCache();
var retVal = myCache.Get("MyKey") as List<string>();
if (retVal == null)
{
retVal = GetFromDB();
myCache.Put("MyKey", retVal, TimeSpan.FromHours(1.0));
}
What am I missing here? How can I troubleshoot this?
Upvotes: 0
Views: 200
Reputation: 276
There is an issue affecting some users of the Managed Cache Service. For assistance, you can contact either Azure Support or the cache team directly at '[email protected]'.
Upvotes: 1