Request timed out. Retries due to rate limiting: True.

dmitrii sablin 0 Reputation points

I use azure cosmos db for mongo db (4.2 version) with 10.000 Ru/s
a have a collection with 2.8m of records. the field "type" are indexed via a Single field index.
when i am trying to perform the query:

db.Actions.aggregate([ {"$group" : {_id:"$type"}} ])

i receive the message:

        "ok" : 0,
        "errmsg" : "Request timed out. Retries due to rate limiting: True.",
        "code" : 50,
        "codeName" : "ExceededTimeLimit"
} : aggregate failed
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,501 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Konstantinos Passadis 17,376 Reputation points MVP

    Hello @dmitrii sablin !

    I understand that your CosmosDB with MongoAPI is getting rate limited .

    Azure Cosmos DB for MongoDB operations may fail with rate-limiting (16500/429) errors if they exceed a collection's throughput limit (RUs).

    You can enable the Server Side Retry (SSR) feature and let the server retry these operations automatically. The requests are retried after a short delay for all collections in your account. This feature is a convenient alternative to handling rate-limiting errors in the client application.

    Have a good look here :

    You could also utilize Change Feed , and Increase Provisioned Throughput | Request Units Change

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!


    0 comments No comments