Microsoft Azure服务总线超时异常

本文关键字:超时 异常 总线 服务 Azure Microsoft | 更新日期: 2023-09-27 17:51:08

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

调用QueueClient x.Send(...)

异常重新抛出在[0]:atMicrosoft.ServiceBus.Common.AsyncResult.End TAsyncResult (IAsyncResult结果)Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End (IAsyncResult结果)1. requestsessionchannel.requestasyncresult.b__4 (RequestAsyncResult Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory"thisPtr, IAsyncResult r) at1. stepcallback (IAsyncResult Microsoft.ServiceBus.Messaging.IteratorAsyncResult"结果)

调用NamespaceManager x.GetQueue(...)

PROGRESS队列处理失败。系统。TimeoutException:请求60000毫秒后超时。圆满完成无法确定请求。其他查询应向判断操作是否成功。TrackingId: bdffb6bd - 5367 - 4573 - aaa3 - 8 ea9a03f5a2b,时间戳:5/28/20158:39:46 AM --> system.net.webeexception: The request was aborted: The请求被取消。在System.Net.HttpWebRequest。EndGetResponse (IAsyncResult asyncResult)
在Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult"1. b__49 (GetAsyncResult"1thisPtr, IAsyncResult r) at1. stepcallback (IAsyncResult Microsoft.ServiceBus.Messaging.IteratorAsyncResult"结果)

呼叫NamespaceManager x.SubscriptionExists(...)

Exception doing periodic work: System。TimeoutException:请求在00:10:00毫秒后超时。圆满完成无法确定请求的时间。应该进行其他查询以确定操作是否成功。服务器堆栈trace:异常重新抛出在[0]:atMicrosoft.ServiceBus.Common.AsyncResult.End TAsyncResult (IAsyncResult结果)Microsoft.ServiceBus.NamespaceManager.OnEndSubscriptionExists (IAsyncResult结果)Microsoft.ServiceBus.NamespaceManager.SubscriptionExists(字符串

主题路径,字符串名称)…

调用QueueClient x.Receive(...)

PROGRESS队列处理失败。Microsoft.ServiceBus.Messaging.MessagingCommunicationException:错误在与服务总线通信期间。检查连接信息,然后重试。--->System.ServiceModel.CommunicationObjectFaultedException:内部服务器错误:服务器没有提供有意义的回复;这可能是由于会话过早关闭造成的。TrackingId: 04 ba0220 - 0350 - 4806 - 9 - c65 c2bba9671054时间戳:28.05.201513:00:55服务器堆栈跟踪:Exception rethrown at [0]: atMicrosoft.ServiceBus.Common.ExceptionDispatcher.Throw(异常例外)Microsoft.ServiceBus.Common.AsyncResult.End TAsyncResult (IAsyncResult结果)Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End (IAsyncResult结果)Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.EndRequest (IAsyncResult结果)1. requestsessionchannel.requestasyncresult.b__4 (RequestAsyncResult Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory"thisPtr, IAsyncResult r) at1. stepcallback (IAsyncResult Microsoft.ServiceBus.Messaging.IteratorAsyncResult"结果 ) ....

异常明显与ServiceBus相关,并且它们是不确定的。抛出它们的函数,例如Send, GetQueue, SubscriptionExists,每分钟被调用不超过100-120次。我们在代码中没有更改任何内容,并且增加超时值(即使是非常高的值,比如10分钟)也没有帮助。此外,我们不认为这是网络相关的问题(在我们这边),因为当应用程序从不同的地方运行时也会出现相同的错误。

其他人最近遇到过这类异常吗?是微软那边出了什么问题,还是我们遗漏了什么?

Microsoft Azure服务总线超时异常

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

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

当我的运行代码开始生成超时异常时,我有类似的问题。经研究发现防火墙阻塞了用于通信的端口。但是,端口80和443仍然是打开的。因此,添加以下代码行对我有效:

ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Https;