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

dmitrii sablin 0 Reputation points
2023-05-14T12:02:13.8066667+00:00

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
    2023-05-14T12:13:17.81+00:00

    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 :

    https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/prevent-rate-limiting-errors

    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!

    Regards

    0 comments No comments