Azure 函数 - 事件中心触发器已停止
Azure Function - Event Hub Trigger stopped
我在事件中心触发器上生产了一个 Azure Function 应用程序,它的吞吐量很低,该函数通常每天只触发一次。它目前 运行 在 S1 计划中,还有一些其他功能,例如定时器触发和 HTTP 触发。
一直 运行 很好,但今天它不再被新消息触发,直到我重新启动应用程序。所有其他功能都运行良好并响应其关联的触发器。
我查看了 App Insights,没有报告任何错误或问题,它只是什么也没做。
是否有其他人遇到过此问题或知道可能导致此问题的原因?
首先 - 您的应用服务是否启用了 Always On?
第二件事 - 您是否尝试在本地测试您的触发器,以确保您的事件中心没有问题?
就我个人而言,当在 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 Function 应用程序,它的吞吐量很低,该函数通常每天只触发一次。它目前 运行 在 S1 计划中,还有一些其他功能,例如定时器触发和 HTTP 触发。
一直 运行 很好,但今天它不再被新消息触发,直到我重新启动应用程序。所有其他功能都运行良好并响应其关联的触发器。
我查看了 App Insights,没有报告任何错误或问题,它只是什么也没做。
是否有其他人遇到过此问题或知道可能导致此问题的原因?
首先 - 您的应用服务是否启用了 Always On?
第二件事 - 您是否尝试在本地测试您的触发器,以确保您的事件中心没有问题?
就我个人而言,当在 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/
尽管如此,联系支持人员以确保没有其他问题是值得的。