- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我向主题队列发送消息时(我正在 Azure 函数中运行代码),我收到了 OperationCanceledException。我使用的版本是:“WindowsAzure.ServiceBus”:“4.1.1”(最新)当我进行负载测试时,我收到此异常,这意味着此服务总线(其中包含多个主题)中正在发送许多消息。我被告知使用重试机制:
client.RetryPolicy = new RetryExponential(minBackoff: TimeSpan.FromSeconds(0.1),
maxBackoff: TimeSpan.FromSeconds(30),
maxRetryCount: 3);
但我认为这已经是默认完成的,不是吗?
请在此提供您的帮助 - 为什么我会遇到此异常以及我该如何解决此问题?
这是一个异常(exception):
Exception System.OperationCanceledException: The operation cannot be performed because the entity has been closed or aborted. ---> System.ServiceModel.CommunicationObjectAbortedException: Internal Server Error: The server did not provide a meaningful reply; this might be caused by a premature session shutdown. TrackingId:88386cb1-a4e6-42e2-a8e1-bad3a2403329, Timestamp:6/6/2017 7:55:23 AM
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.EndRequest(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<>c.<GetAsyncSteps>b__9_3(RequestAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass8_1.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.EndRequest(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<>c.<GetAsyncSteps>b__9_3(RequestAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Sbmp.SbmpTransactionalAsyncResult`1.<>c.<GetAsyncSteps>b__18_3(TIteratorAsyncResult thisPtr, IAsyncResult a)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.EndSendCommand(IAsyncResult result)
--- End of inner exception stack trace ---
at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.EndSendCommand(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.OnEndSend(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.MessageSender.OnSend(TrackingContext trackingContext, IEnumerable`1 messages, TimeSpan timeout)
at Microsoft.ServiceBus.Messaging.MessageSender.Send(TrackingContext trackingContext, IEnumerable`1 messages, TimeSpan timeout)
最佳答案
默认情况下,ASB 客户端启用重试策略。您不需要自己做。
您得到的异常是 OperationCanceledException
并根据文档:
Retry will not help.
这被归类为“用户编码错误”。查看异常堆栈跟踪,这是在发送操作期间发生的,错误是
Internal Server Error: The server did not provide a meaningful reply; this might be caused by a premature session shutdown. TrackingId:88386cb1-a4e6-42e2-a8e1-bad3a2403329...
我很确定这不是用户代码错误,而是代理端发生的事情。错误提供的 TrackingId
应该允许您向 Microsoft 提出支持案例,以便至少了解该命令失败时代理上发生的情况。
编辑
同时,我建议它使用额外的重试/退避逻辑来实现您的操作。不会在紧密循环中重试并且不依赖于客户端的 RetryPolicy
的东西。
关于azure - 发送到服务总线时出现OperationCanceledException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44385210/
目录 总线是什么? 常见总线类型有哪些? 总线的串行和并行的区别? 数据总线 地址总线
从下面的代码我在 map 上添加标记,每 15 秒刷新一次并从数据库中获取新的纬度和经度。标记(巴士图像)已成功添加到 map 上并从一个位置平稳移动到另一个位置,就像汽车在路上行驶一样。现在我想要的
如果在小端处理器上运行的程序将未缓存的值 0xaabbccdd 写入地址 0,并且处理器使用 32 位宽的 AXI4 总线,那么 WDATA 的第 31-24 位是 0xaa 还是 0xdd? AXI
是否存在用于将进程内服务消息传递给另一个服务的扭曲机制?我写了一个原型(prototype)总线,看起来像 from collections import defaultdict ch
我修改了设备树文件并使用 4 个 GPIO 引脚启用了 spi,这些引脚支持 pinmux 并从 gpio 切换到 spi 功能。但是在 Linux 内核代码中,代码如何知道使用了哪个 spi 总线/
我正在使用控创嵌入式计算机通过 I2C 与 ST 微 Controller 通信。我正在使用开发适配器与 I2C 接口(interface),使用描述的简单 read() 和 write() 函数 h
我有一个需要 PEC 的 I2C/SMBus 设备我正在为它编写一个内核空间驱动程序。 在 Linux 2.6.37 上我使用 i2c_board_info实例化客户端并在那里设置标志,但现在驱动程序
我想确认我的消息已经通过 socketCAN 库保存在 CAN 总线上。socketCAN 文档描述了使用 recvmsg() 函数时的这种可能性,我对其实现有疑问。 我要实现的功能是确认我的消息在仲
下面是我的代码 #import #import int main(int argc, const char *argv[]) { char *str = "First string";
在大量使用 D-Bus 的应用程序中获得更好的时间性能有哪些好的做法? ? 以下是我们的团队通过硬敲学校学到的一些知识: 尝试将数据实体组合成一个单一的大型结构/对象,以通过 D-Bus IPC 发送
我正在Akka内核下运行Akka应用程序,该程序在其他系统上也可以正常工作。 akka { loggers = ["akka.event.slf4j.Slf4jLogger"] log
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
我是 C 语言新手,对于家庭作业考试,我必须实现一个简单的服务器套接字程序,该程序在循环中发送一些数据,并且如果客户端连接到服务器套接字(已使用 Arduino 完成,但需要相同的功能)在 raspb
我正在构建一个由许多(> 100)个相同节点组成的系统,所有节点均通过 CAN 总线连接。这个想法是所有节点必须具有相同的信息,任何节点都可以生成事件并通过 CAN 广播它。对于这些事件,CAN 帧提
您好,我在解析 IIB Toolkit 中的任何 JSON 时遇到问题。 java计算节点抛出的异常为:java.lang.NoClassDefFoundError: org.json.JSONObj
我买了这个传感器: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Weather/RHT03.pdf 输出为“MaxDetect 1-w
我正在用户空间编写包装器 API,用于在嵌入式 Linux 平台上用 C 语言控制 I2C 总线。我能够使用 read() 和 write() 方法以及 ioctl() 调用来选择从属设备,从而从传感
在我的软件(用 C++ 编写)中,我使用 Linux 标准函数打开 CAN 总线套接字并执行 I/O 操作。 套接字的打开和使用如下: /* Create the socket */ if ((
每天——大约 5 到 10 次——我的 USB 摄像头从系统中消失。它从第一天开始就发生了,因为制造商驱动程序与 Linux 不兼容。 lsusb 和 dmesg 一开始正确显示,但在较长时间后有时会
我分发了包含多个 Go 服务的应用程序。其中一些使用 Kafka 作为数据总线。我能够使用 Jaeger 的 opentracing 追踪服务之间的调用。我在图表上绘制 Kafka 跨度时遇到问题,它
我是一名优秀的程序员,十分优秀!