7

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?

0

2 Answers 2

9

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.

8

Client Side it is the maxBufferSize on the transport element in your DataCacheClient config section.

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

Edit:

Example of the 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>
4
  • 2
    Isn't there something that has to be done on the server side as well?
    – irperez
    Aug 10, 2010 at 14:33
  • Could you provide a sample XML config of the DataCache section?
    – irperez
    Aug 10, 2010 at 14:33
  • Server requires same settings, under advancedProperties element of its config. May 22, 2011 at 18:17
  • In addition to this the adjustments made to the buffer sizes and receiveTimeout noted here (social.msdn.microsoft.com/Forums/en-US/velocity/thread/…) solved my problem. <transportProperties maxOutputDelay="2" channelInitializationTimeout="60000" receiveTimeout="900000" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"/>
    – user181799
    Mar 30, 2012 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.