1

发生了一件非常奇怪的事情,
我有一个用 MVC 3 制作的网站,部署在 Azure WebRole 中
,它运行良好,最初是在 VS2010 中制作的,
现在我使用 VS2012
,我决定做一些小改动,它似乎正在工作,但是以随机间隔保持故障
这是

随机间隔后发生的情况 我在收到此错误ErrorCode<ERRCA0017>:SubStatus<ES0006>
2-3 分钟后收到此错误 站点似乎工作正常

我没有更改与缓存
此错误相关的站点的先前版本的任何内容nt 发生在我在代码中测试它staging或在local environment
我以编程方式访问此缓存的任何位置时
我已经从 azure 门户复制粘贴了整个配置,我知道它是正确的,因为这些配置设置与
我刚刚使用之前工作的配置设置相同,Azure AppFabric Caching因为我需要保存sessions一些位置。所以唯一提到它的地方是在我的网站上web config,正如我所说的那样,所有配置都可以假设是正确的。

如果这可以有所帮助,这是堆栈跟踪

[DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.)]
   Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody) +616
   Microsoft.ApplicationServer.Caching.DataCache.ExecuteAPI(RequestBody reqMsg, IMonitoringListener listener) +29
   Microsoft.ApplicationServer.Caching.DataCache.InternalGetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle, String region, Boolean lockKey, IMonitoringListener listener) +227
   Microsoft.ApplicationServer.Caching.<>c__DisplayClass78.<GetAndLock>b__77() +103
   Microsoft.ApplicationServer.Caching.DataCache.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle) +258
   Microsoft.Web.DistributedCache.<>c__DisplayClass31`1.<PerformCacheOperation>b__30() +19
   Microsoft.Web.DistributedCache.DataCacheRetryWrapper.PerformCacheOperation(Action action) +208
   Microsoft.Web.DistributedCache.DataCacheForwarderBase.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle) +190
   Microsoft.Web.DistributedCache.BlobBasedSessionStoreProvider.GetItem(HttpContextBase context, String id, Boolean acquireWriteLock, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +593
   Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +125
   System.Web.SessionState.SessionStateModule.GetSessionStateItem() +178
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1076
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +115
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

更新:-
突然我发现了一个新错误,在我看来这是许多网站谈论
错误描述的内部错误之一

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [IP-Address]:[PORT]


这是新的堆栈跟踪

[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [IP-ADDRESS]:[PORT]]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +305
   System.Net.Sockets.Socket.Connect(EndPoint remoteEP) +162
   System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout) +774

[EndpointNotFoundException: Could not connect to [SOCKET-ENDPOINT]. The connection attempt lasted for a time span of 00:00:21.0308462. TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 111.221.89.111:22233. ]
   System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase) +518
   System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData) +401
   Microsoft.ApplicationServer.Caching.OpenDelegate.EndInvoke(IAsyncResult result) +0
   Microsoft.ApplicationServer.Caching.ChannelContainer.Opened(IAsyncResult ar) +122
4

1 回答 1

0

一年多前有一篇关于此错误的有趣博客文章:Azure AppFabric Caching - ErrorCode:SubStatus : What to do?.

在初始化 DataCacheFactory 之前,将您正在使用的 dataCacheFactoryConfiguration 实例的 DataCacheFactoryConfiguration.ChannelOpenTimeout 修改为 2 分钟的较大值。(不能使用配置来设置值,因为在允许的限制内 20 秒)。此外,此建议仅用于调试目的,理想情况下在生产环境中不需要。这使底层能够以发生的实际错误进行响应。现在,如果您检查内部异常,您应该会看到导致请求失败的原因。

请按照以下步骤查找内部异常,该异常将解释请求失败的原因。

注意:如果这是由瞬态故障引起的,您应该考虑使用瞬态故障处理应用程序块(也支持 AppFabric 缓存)来实施重试策略。

于 2012-09-24T11:51:59.950 回答