I have an azure IoT hub with 10 IoT devices on it. For some strange reason, all devices keep getting offline. After some hours(or shorter) being connected, they suddenly get disconnected. When a device is manually restarted it starts again sending data and things seem to be solved, but the device quickly gets disconnected again:
Error: Time:Fri Jun 14 11:50:35 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK
Error: Time:Fri Jun 14 11:50:35 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK
Error: Time:Fri Jun 14 11:50:35 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK
Error: Time:Fri Jun 14 11:50:35 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK
Because the devices are spread over physical different locations I assume it cannot be an internet connection problem. Even my device simulator in NodeJS running at home is disconnected after an hour or so.
The IoT hub is a B1 with 2 hub units configured. According to the IoT specs for B1 it should be able to handle 400.000 messages per day with a max size of 4KB each. Since the messages are less than a 1 KB and are only sent every 10 minutes, the message count must be far below 2 times 400.000.
Does anyone have an idea what could be the problem here?
Am I correct in my assumption that other Azure resources (e.g. the Database, Web App or Azure Function that are running as well) cannot overconsume CPU/memory such that the IoT hub gets throttled?
Extra details: The devices on the IoT hub use MQTT to send data. In order to read data from the IoT hub an Azure function is used (no errors are visible here).