Windows Server AppFabric Caching支援大資料量的配置

來源:互聯網
上載者:User

Memcache支援的資料量大小為1M,最新版本可以通過配置調整突破1M(參看http://www.cnblogs.com/shanyou/archive/2010/02/01/1661271.html),AppFabric Caching也支援大資料量的緩衝。當你看到這樣的錯誤的時候就需要調整參數了。

Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0016>:SubStatus<ES0001>: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.

解決方法,必須同時在 服務端及 用戶端增加 MaxBufferSize 的配置。

  • 首先是 服務端
Export Cluster Config

Export-CacheClusterConfig -File c:\temp\appFabriccluster.config
將Cluster 的設定匯出到一個xml config 檔案。這裡我取名叫做 appFabriccluster.config

增加 transportProperties 的配置,按照 Application Configuration Settings 的建議,在上一步驟的appFabriccluster.config 增加下面的配置。匯入並應用配置
在匯入配置前,必須先停止 Cluster。匯入配置完成後,再啟動Cluster。
Stop-CacheCluster
Import-CacheClusterConfig -File c:\temp\appFabriccluster.configStart-CacheCluster
  • 再來是 用戶端

在 Client config 加入 transportProperties 配置

   1: <?xml version="1.0" encoding="utf-8" ?>

   2: <configuration>

   3:    <!--configSections must be the FIRST element -->

   4: <configSections>

   5:    <!-- required to read the <dataCacheClient> element -->

   6:    <section name="dataCacheClient"

   7:          type="Microsoft.ApplicationServer.Caching.DataCacheClientSection,

   8:             Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, 

   9:             Culture=neutral, PublicKeyToken=31bf3856ad364e35"

  10:           allowLocation="true"

  11:           allowDefinition="Everywhere"/>

  12: </configSections>

  13:  

  14:    <dataCacheClient requestTimeout="15000" channelOpenTimeout="3000" maxConnectionsToServer="1">

  15:       <localCache isEnabled="true" sync="TimeoutBased" ttlValue="300" objectCount="10000"/>

  16:       <clientNotification pollInterval="300" maxQueueLength="10000"/>

  17:       <hosts>

  18:          <host name="CacheServer1" cachePort="22233"/>

  19:          <host name="CacheServer2" cachePort="22233"/>

  20:       </hosts>

  21:       <securityProperties mode="Transport" protectionLevel="EncryptAndSign" />

  22:       <transportProperties connectionBufferSize="131072" maxBufferPoolSize="268435456" 

  23:                            maxBufferSize="8388608" maxOutputDelay="2" channelInitializationTimeout="60000" 

  24:                            receiveTimeout="600000"/>

  25:    </dataCacheClient>

  26: </configuration>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.