Can I configure the AppFabric Cache server to store large objects?

I get an error with the AppFabric Cache server when I assume that a larger graph of objects is being added to the cache.

ErrorCode: SubStatus: the connection was terminated, possibly due to problems with the server or network or the serialized size of the object larger than MaxBufferSize on the server. The result of the request is unknown.

I know for sure that this is not a network problem. I was able to add a bunch of cached objects to this particular one. And looking at it, the object is slightly larger than the others that are added to the cache.

How to configure MaxBufferSize on AppFabric Cache?

+7
caching appfabric
source share
2 answers

The client side is maxBufferSize in the transport element in the DataCacheClient configuration section.

<transportProperties ..whatever else you have.. maxBufferSize="8388608" /> 

Edit:

Example DataCacheClient section from MSDN

 <?xml version="1.0" encoding="utf-8" ?> <configuration> <!--configSections must be the FIRST element --> <configSections> <!-- required to read the <dataCacheClient> element --> <section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere"/> </configSections> <dataCacheClient requestTimeout="15000" channelOpenTimeout="3000" maxConnectionsToServer="1"> <localCache isEnabled="true" sync="TimeoutBased" ttlValue="300" objectCount="10000"/> <clientNotification pollInterval="300" maxQueueLength="10000"/> <hosts> <host name="CacheServer1" cachePort="22233"/> <host name="CacheServer2" cachePort="22233"/> </hosts> <securityProperties mode="Transport" protectionLevel="EncryptAndSign" /> <transportProperties connectionBufferSize="131072" maxBufferPoolSize="268435456" maxBufferSize="8388608" maxOutputDelay="2" channelInitializationTimeout="60000" receiveTimeout="600000"/> </dataCacheClient> </configuration> 
+8
source share

You also need to increase the buffer size on the server side:

If you are using XML configuration, add the following:

 <advancedProperties> <transportProperties maxBufferSize="8388608" /> </advancedProperties> 

If you are using SQL configuration, you need to export it to a file:

 Export-CacheClusterConfig -File [yourfilepath] 

Modify the file above and import it again:

 Stop-CacheCluster Import-CacheClusterConfig -File [yourfilepath] Start-CacheCluster 

However, it is not recommended that you store large files in AppFabric Cache.

+9
source share

All Articles