首页 文章

存储数据时Azure缓存异常

提问于
浏览
0

目前我在我的WCF应用程序中使用Azure缓存,并且在将数据放入缓存时出现此异常:

Microsoft.ApplicationServer.Caching.DataCacheException:ErrorCode <ERRCA0017>:SubStatus <ES0006>:存在临时故障 . 请稍后重试 . (一个或多个指定的缓存服务器不可用,这可能是由繁忙的网络或服务器引起的 . 对于内部部署缓存集群,还要验证以下条件 . 确保已为此客户端帐户授予安全权限,并检查AppFabric允许缓存服务通过所有缓存主机上的防火墙 . 服务器上的MaxBufferSize也必须大于或等于从客户端发送的序列化对象大小 . )

这是内在的例外:

System.ServiceModel.CommunicationException:套接字连接已中止 . 这可能是由于处理消息的错误或远程主机超出接收超时或基础网络资源问题引起的 . 本地套接字超时为'00:00:30' . ---> System.Net.Sockets.SocketException:远程主机在System的System.Net.Sockets.Socket.Send(Byte []缓冲区,Int32偏移量,Int32大小,SocketFlags socketFlags)强制关闭现有连接 . ServiceModel.Channels.SocketConnection.Write(Byte [] buffer,Int32 offset,Int32 size,Boolean immediate,TimeSpan timeout)---内部异常堆栈跟踪结束---在System.ServiceModel.Channels.SocketConnection.Write(Byte [ System.ServiceModel上的System.ServiceModel.Channels.SocketConnection.Write(Byte []缓冲区,Int32偏移量,Int32大小,布尔值立即,TimeSpan超时,BufferManager缓冲区)处于缓冲区,Int32偏移量,Int32大小,布尔值立即数,TimeSpan超时值System.ServiceModel.Channels.BufferedConnection.Write(Byte []缓冲区,Int32偏移量,Int32大小,布尔立即数,TimeSpan .Channels.BufferedConnection.WriteNow(Byte []缓冲区,Int32偏移量,Int32大小,TimeSpan超时,BufferManager缓冲区管理器) System.Serv上的timeout,BufferManager bufferManager) Microsoft的Microsoft.ApplicationServer.Caching.CacheResolverChannel.Send(消息消息,TimeSpan超时)上的System.ServiceModel.Channels.OutputChannel.Send(消息消息,TimeSpan超时)中的iceModel.Channels.FramingDuplexSessionChannel.OnSend(消息消息,TimeSpan超时) .ApplicationServer.Caching.WcfClientChannel.SendOnChannel(EndpointID endpoints ,TimeSpan和超时,WaitCallback回调,对象状态,布尔异步,IDuplexSessionChannel通道,消息消息)---内部异常堆栈跟踪结束---在Microsoft.ApplicationServer.Caching.DataCache Microsoft.ApplicationServer.Caching.DataCache.InternalPut(String key,Object value,DataCacheItemVersion oldVersion,TimeSpan timeout,DataCacheTag []标签的Microsoft.ApplicationServer.Caching.DataCache.ExecuteAPI(RequestBody reqMsg,IMonitoringListener listener)上的.ThrowException(ResponseBody respBody) ,字符串区域,IMonitoringListener侦听器),位于Microsoft.ApplicationServer.Caching.DataCache . <> c_DisplayClass19.b_18 ()Microsoft.ApplicationServer.Caching.MonitoringListenerFactory.EmptyListener.Microsoft.ApplicationServer.Caching.IMonitoringListener.Listen [TResult](Func`1 innerDelegate)at Microsoft.ApplicationServer.Caching.DataCache.Put(String key,Object value)

问题是这个消息很一般,没有提供太多细节

我已经尝试将dataCacheClient中的requestTimeout增加到2分钟 . 这并没有解决问题,所以它不应该因为连接到缓存超时

我知道这不是因为数据量太大也是因为 生产环境 服务器上相同数量的数据没有问题(这发生在测试服务器上) . 我从本地计算机连接到测试数据库,也没有问题

任何人有任何想法如何解决这个问题?谢谢

以下是我目前的Azure缓存配置

<dataCacheClient name="default" requestTimeout="30000" isCompressionEnabled="true" >
  <localCache isEnabled="true" sync="TimeoutBased" objectCount="4194304" ttlValue="80000" />
</dataCacheClient>

1 回答

相关问题