Azure 函数 - 事件中心触发器已停止

标签 azure azure-functions azure-eventhub

我在事件中心触发器上有一个正在生产的 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/

相关文章:

azure - 通过 Azure Functions 处理 Azure 事件中心事件与使用 Azure.Messaging.EventHub SDK 的 .NET 控制台应用程序处理 Azure 事件中心事件,有任何实际差异吗?

azure - 使用托管标识从逻辑应用调用受 Azure AD 保护的 API

c# - 服务总线 : Can't receive any message in first 15-20 sec, 然后就可以工作了

azure - 微软.WindowsAzure.存储: No valid combination of account information found

Azure Functions - 使用 Azure Functions 的表存储触发器

python - Azure Functions (Python) blob 输出绑定(bind)。当名称只是输入消息的一部分时如何设置名称

azure-functions - 将 Azure 函数部署槽与 EventHub 结合使用

python - Azure存储关闭自动解压

azure - 无法使用图形 API 从 Azure AD B2C 检索用户电子邮件

azure - 如何决定在 Azure 事件中心中使用多少个分区