我在事件中心触发器上有一个正在生产的 Azure 函数应用程序,它的吞吐量较低,该函数通常每天仅触发一次。目前它正在 S1 计划上运行,并具有一些其他功能,例如计时器触发和 HTTP 触发。
它一直运行良好,但今天它不再被新消息触发,直到我重新启动应用程序。所有其他功能都工作正常并响应其关联的触发器。
我查看了 App Insights,没有报告任何错误或问题,它只是没有执行任何操作。
还有其他人遇到过此问题或知道可能导致此问题的原因吗?
最佳答案
首先 - 您的应用服务是否启用了始终开启?
第二件事 - 您是否尝试在本地测试触发器,以便确定您的事件中心没有问题?
就我个人而言,当 EventHubTrigger 中实现的事件主机处理器由于引入了额外的处理器而失去租约时,我遇到了此类问题。也有可能,由于它面临低吞吐量,它失去了租约并且由于某种原因无法续订:
As an instance of EventProcessorHost starts it will acquire as many leases as possible and begin reading events. As the leases draw near expiration EventProcessorHost will attempt to renew them by placing a reservation. If the lease is available for renewal the processor continues reading, but if it is not the reader is closed and CloseAsync is called - this is a good time to perform any final cleanup for that partition.
https://blogs.msdn.microsoft.com/servicebus/2015/01/21/event-processor-host-best-practices-part-2/
尽管如此,还是值得联系支持人员以确保没有其他问题。
关于Azure 函数 - 事件中心触发器已停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52084337/