Problem to use IotHub API

Marcos Antonio Okita 5 Reputation points
2023-10-23T17:30:12.1333333+00:00

I´m experiencing an error to access IotHub devices by API and IotHub web portal.

To reproduce the problem:

  1. access webportal
  2. SMARTSITE-HUB-IOT | Devices
  3. Wait a list of devices
  4. Click em read more (load more button)

I implemented a nodejs code to call the iot-hub sdk registry service.

 var queryTwinsAsync = async (collection) => {
        const query = registry.createQuery(`SELECT * FROM devices WHERE tags.environment = '${environment}'`, 100);
        //const query = registry.createQuery(`SELECT * FROM devices WHERE tags.bindings.siteId = '63e4f6be84d2420011433527'`, 100);
        const {message, result} = await query.nextAsTwin()

when I call this code 3 times.... the second call returns:

statusCode: 429, statusMessage: 'Too Many Requests', responseBody: '{"Message":"ErrorCode:ThrottlingBacklogTimeout;The request has been throttled. Wait 10 seconds and try again. Operation type: Query","ExceptionMessage":"Tracking ID:b2d18a80fd2c47acb9c66ee7e7f40094-G:0-TimeStamp:10/24/2023 13:58:47"}'

Any help will be appreciated.

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

2 answers

Sort by: Most helpful
  1. Sander van de Velde 29,616 Reputation points MVP
    2023-10-23T19:55:26.45+00:00

    Hello @Marcos Antonio Okita,

    welcome to this moderated community forum.

    It seems the Azure portal is experiencing some timeouts. This happens sometimes and most of the time this is resolved within hours.

    Can you try to switch over to other tooling to list and manage devices like the Azure IoT Explorer or the Visual Studio IoT Hub extension?


    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. LeelaRajeshSayana-MSFT 13,946 Reputation points
    2023-10-24T19:44:29.0533333+00:00

    Hi @Marcos Antonio Okita Thank you for reaching out to us through the email and sharing additional information on the issue. I have updated the question to include additional details you have shared on the issue to help the community understand it better.

    There are few limitations applicable to the Twin reads before which they get throttled by the IoT Hub. Please refer the limitations below.

    Standard tier operations

    User's image

    For example, two S2 units are 2*10 = 20 twin reads/sec before which the twin reads get throttled. Please inspect the number of units you have and the tier of your IoT Hub to determine the exact rate before the reads get throttled.

    Posting the details here to help other community members experiencing a similar issue help understand the throttling limits.


    If the response helped, please do 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.

    0 comments No comments