Azure IoT Hub total number of messages used has increased x5 - and I dont know why

Michael Skaaning Kristensen 25 Reputation points
2024-03-04T09:42:05.7166667+00:00

Metrics for my IoT Hub looks like this (Total number of messages used - last 30 days / granularity 1 day)

User's image

I am looking through the other metrics, but I cannot find anything that could explain this increase. All other metrics seem fairly stable over the time period - most of them go up and down a little but none of them increase significantly, and certainly nothing like above.

How should I go about debugging this?

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,133 questions
0 comments No comments
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 13,786 Reputation points
    2024-03-05T15:05:32.29+00:00

    Thank you @Sander van de Velde for your feedback on this post.

    @Michael Skaaning Kristensen I appreciate your investigation on this issue and figuring out what is contributing towards the increased number of messages on the IoT Hub. I am providing your observations below to help other community members figure out one of the possible reasons for the message count increase.

    Issue: Total number of messages used

    The total number of messages count on IoT Hub increased drastically.

    Cuase

    Further analysis on Diagnostic logs revealed that Device to Cloud File upload has increased which contributed to the increased number of messages.

    Device to Cloud file upload messages also contribute towards the total number of messages in Azure IoT Hub. When a device uploads a file to IoT Hub, it is treated as a message and counted towards the message quota for the IoT Hub.

    It's worth noting that the size of the uploaded file can affect the number of messages that are counted towards the quota. For example, if a device uploads a large file, it may be split into multiple messages, each of which will count towards the message quota. Here is a reference to the Throttling limits

    I cannot get a view of this device to cloud file upload in the metrics section.

    There is no out of the box view provided on IoT Hub to monitor/track the file uploads. If you files are being routed to a same blob storage end point, you can create a view on the storage container and keep track on the total transactions on the end point such as below.

    User's image

    Hope this helps! I appreciate it if you can click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    If you have any further questions or need further clarification, please let us know and we would be glad to assist you further.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Sander van de Velde 29,456 Reputation points MVP
    2024-03-04T18:13:21.8266667+00:00

    Hello @Michael Skaaning Kristensen ,

    welcome to this moderated Azure community forum.

    An IoT Hub 'message' is also called a chunk, a 4KB (part of a) message. So, a single telemetry message with a size of 6KB, is counted as two messages.

    The device-to-cloud message size is a combination of the body length, application properties size and reported properties size.

    The consumption of cloud-to-device communication is also part of the consumption.

    The number of active/connected devices is also a factor.

    You can limit the consumption either by sending less messages, using batching, and/or compression.

    It seems something has changed...

    Are you sure the sourcecode is not changed? Has the message size increased?

    Else, have you tried the diagnostics yet?

    enter image description here

    The IoT Hub does not expose individual device message counts in the metrics. Please use a tool like the (free) Azure Data Explorer to query for device related consumption outliers.

    Please let us know if you found a possible


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    2 people found this answer helpful.