繁体   English   中英

是否可以调整AppFabric Cache服务器来存储更大的对象?

[英]Is it possible to adjust AppFabric Cache server to store larger objects?

当我假设更大的对象图被添加到缓存时,我收到AppFabric缓存服务器的错误。

ErrorCode:SubStatus:连接已终止,可能是由于服务器或网络问题或序列化对象大小大于服务器上的MaxBufferSize。 请求的结果未知。

我确信它不是网络问题。 我能够在这个特定的对象之前添加一堆对象进行缓存。 调查一下,该对象比添加到缓存中的其他对象要大一些。

如何在AppFabric Cache上调整MaxBufferSize?

您还需要增加服务器端的缓冲区大小:

如果使用XML配置,请添加以下内容:

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

如果使用SQL配置,则需要将其导出到文件:

Export-CacheClusterConfig -File [yourfilepath] 

更改上面列出的文件,然后重新导入:

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

但是,不建议在AppFabric Cache中存储大文件。

客户端它是DataCacheClient配置部分中传输元素的maxBufferSize

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

编辑:

来自MSDN的DataCacheClient部分的示例

<?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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM