c# - Microsoft Azure 服务总线超时异常

标签 c# azure timeout azureservicebus

我们有一个在 Microsoft Azure 云平台上运行的应用程序。某些组件之间的通信是使用服务总线进行的。一切都工作正常,直到最近我们开始收到以下类型的超时异常:

调用QueueClient x.Send(...)

Exception rethrown at [0]: at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory `1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

当调用NamespaceManager x.GetQueue(...)

PROGRESS queue processing failed. System.TimeoutException: The request has timed out after 60000 milliseconds. The successful completion of the request cannot be determined. Additional queries should be made to determine whether or not the operation has succeeded. TrackingId:bdffb6bd-5367-4573-aaa3-8ea9a03f5a2b,TimeStamp:5/28/2015 8:39:46 AM ---> System.Net.WebException: The request was aborted: The request was canceled. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult`1.b__49(GetAsyncResult`1 thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

调用NamespaceManager x.SubscriptionExists(...)

Exception doing periodic work: System.TimeoutException: The request has timed out after 00:10:00 milliseconds. The successful completion of the request cannot be determined. Additional queries should be made to determine whether or not the operation has succeeded. Server stack trace: Exception rethrown at [0]: at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.NamespaceManager.OnEndSubscriptionExists(IAsyncResult result) at Microsoft.ServiceBus.NamespaceManager.SubscriptionExists(String topicPath, String name) ...

调用QueueClient x.Receive(...)

PROGRESS queue processing failed. Microsoft.ServiceBus.Messaging.MessagingCommunicationException: Error during communication with Service Bus. Check the connection information, then retry. ---> System.ServiceModel.CommunicationObjectFaultedException: Internal Server Error: The server did not provide a meaningful reply; this might be caused by a premature session shutdown. TrackingId:04ba0220-0350-4806-9c65-c2bba9671054, Timestamp:28.05.2015 13:00:55 Server stack trace: Exception rethrown at [0]: at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception) at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result) at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.EndRequest(IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) ….

这些异常显然与 ServiceBus 有关,并且它们是不确定的。抛出它们的函数,例如 SendGetQueueSubscriptionExists 每分钟调用次数不超过 100-120 次。我们没有对代码进行任何更改,并且增加超时值(甚至高得离谱,例如 10 分钟)也没有帮助。另外,我们不认为这是一些与网络相关的问题(在我们这边),因为当应用程序从不同的地方运行时会发生相同的错误。

最近有其他人遇到过此类异常吗?是 Microsoft 方面出现问题还是我们遗漏了什么?

最佳答案

几周前,我们已经生产了好几个月的 Service Bus 应用程序突然出现了无法解释的计时问题。我们的仍然可以工作,但每隔几个调用就会花费 10 秒以上,而它们通常是 100-200 毫秒。这种情况持续了几个星期,我花了大部分时间试图弄清楚发生了什么,但一直没有这么做,因为问题突然消失了。

我们确实了解到,在问题发生时,我们在同一数据中心和其他数据中心创建用于测试的新服务总线命名空间并未出现相同的问题。服务总线小组没有提供任何帮助,只是说响应时间无法保证,只有 SLA 可以保证。

关于c# - Microsoft Azure 服务总线超时异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30509545/

相关文章:

c# - PPT幻灯片转图片

azure - 从传统的用户名/密码身份验证迁移到 WIF

c# - 在基本 Azure Function 项目中找不到 ServiceBusTrigger

java - Apache 弗林克 : Standalone Cluster tries to connect with username "flink"

Python子进程超时?

python - Django:你如何阻止长查询杀死你的数据库?

c# - Azure blob 存储 V12 - 使用专用类 BlockBlobStorage 的示例

c# - System.IO.File' 不包含 Unity3D 中 `AppendAllText' 错误的定义?

c# - 项目控制 : How To Use FindName within ItemsPanelTemplate to access Panel

azure - Azure Functions 的筛选器