简体   繁体   English

Azure功能停止从IoT Hub调用

[英]Azure function stops getting called from IoT Hub

I have an IoTHub and a Function app containing a function (EventHubTrigger C#). 我有一个IoTHub和一个包含函数的Function应用程序(EventHubTrigger C#)。

I can see that the IoTHub receives approx. 我可以看到IoTHub收到约。 6 messages from my device per hour - and the function gets called and stores data in a database. 每小时从我的设备发送6条消息 - 该函数被调用并将数据存储在数据库中。 The function calls execution time is between 15ms and 60ms. 函数调用执行时间在15ms到60ms之间。 (Actually 15-60ms is during test, now that i look closer to the call log it tends more to be around 70-140ms) (实际上15-60ms是在测试期间,现在我看起来更接近呼叫日志,它往往更多地在70-140ms左右)

My problem is that the function stops getting called after some time. 我的问题是该函数在一段时间后停止调用。 This has happened a couple of times now. 这已经发生过几次了。 Today, it ran for approx. 今天,它跑了大约。 10 hours and then the function does not get called anymore. 10个小时,然后该功能不再被调用。 Messages are still received in the IoThub. 消息仍然在IoThub中接收。

I can invoke the function manually with test data, and that is handled correctly. 我可以使用测试数据手动调用该函数,并且可以正确处理。 But it is still not being called from the IoTHub. 但它仍未被IoTHub调用。

The plan i am running is Pay As You Go - NorthEuropePlan (Consumption). 我正在运行的计划是Pay As You Go - NorthEuropePlan(消费)。

Any suggestions ? 有什么建议 ?

IoTHub消息即将发布

突然,该功能停止被调用

10 hours and then the function does not get called anymore. 10个小时,然后该功能不再被调用。 Messages are still received in the IoThub. 消息仍然在IoThub中接收。

Here is a similar issue , according to paulbatum's reply, if the connection string contain EntityPath, which may cause the issue. 根据paulbatum的回复,这是一个类似的问题 ,如果连接字符串包含EntityPath,这可能会导致问题。 Please check if your connection string contain EntityPath. 请检查您的连接字符串是否包含EntityPath。

If possible, you could try to create a new Azure function with same code logic to check if same issue appear. 如果可能,您可以尝试使用相同的代码逻辑创建新的Azure功能,以检查是否出现相同的问题。 And you could try to use App Service plan (and enable the Always On setting) to check if it will help resolve issue. 您可以尝试使用App Service计划(并启用Always On设置)来检查它是否有助于解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM