I'm getting an error with the AppFabric Cache Server when I presume a larger object graph gets added to the cache.
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.
I know for sure its not a network problem. I was able to add a bunch of objects to cache before this particular one. And looking into it, the object is a bit bigger than the others that got added to cache.
How can I adjust the MaxBufferSize on AppFabric Cache?
AppFabric Caching stores serialized managed objects in a cache cluster. The cache cluster consists of one or more machines that pool their available physical memory. This pooled memory is presented to cache clients as a single source of caching memory. Objects are stored and accessed using an associated key value.
The Distributed Cache service uses half of that memory allocation for data storage (also known as cache size), and the other half of that memory allocation is used for memory management overhead. When the cached data grows, the Distributed Cache service uses the entire 10 percent of the allocated memory.
The Start-CacheCluster commandlet starts the caching service on all the servers that are part of the cluster with the lead hosts starting before non-lead hosts. 3. Once the Caching Service is up and running, we can query it for the caches that are available in this cluster by using the Get-Cache command.
You need to increase the buffer size on the server side as well:
If you use XML config add the following:
<advancedProperties>
<transportProperties maxBufferSize="8388608" />
</advancedProperties>
If you use SQL configuration,you need to export it to a file:
Export-CacheClusterConfig -File [yourfilepath]
Change the file as listed above and than import it again:
Stop-CacheCluster
Import-CacheClusterConfig -File [yourfilepath]
Start-CacheCluster
Nevertheless it's not recommended to store large files in the AppFabric Cache.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With