2010-08-10 68 views
7

當我假定一個較大的對象圖被添加到緩存中時,出現AppFabric Cache Server錯誤。是否可以調整AppFabric Cache服務器以存儲較大的對象?

ErrorCode:SubStatus:連接已終止,可能是由於服務器或網絡問題或序列化對象大小大於服務器上的MaxBufferSize。請求的結果是未知的。

我知道肯定它不是一個網絡問題。在這個特定的之前,我能夠添加一堆對象來緩存。看着它,該對象比添加到緩存中的其他對象稍大一些。

我怎樣才能調整對AppFabric的緩存的MAXBUFFERSIZE?

回答

8

客戶端它是您的DataCacheClient配置部分傳輸元素上的maxBufferSize

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

編輯:

如果您使用XML配置:

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> 
+2

是不是有東西,必須要在服務器端完成的呢? – irperez 2010-08-10 14:33:33

+0

您能否提供DataCache部分的示例XML配置? – irperez 2010-08-10 14:33:56

+0

服務器需要在其配置的advancedProperties元素下進行相同的設置。 – andrewbadera 2011-05-22 18:17:55

9

你需要增加緩衝區大小在服務器端,以及在DataCacheClient部分的示例添加以下內容:

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

如果使用SQL配置,你需要將它導出到文件:

Export-CacheClusterConfig -File [yourfilepath] 

更改文件上面列出不是再次導入:

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

儘管如此,它不建議存放AppFabric Cache中的大文件。

相關問題