Elouan Keryell-Even
Elouan Keryell-Even

Reputation: 1077

Azure CosmosDB MongoDB: WriteError - Request timed out

With my team we use the Azure Cosmosdb Mongodb service, and we are attempting to perform a deleteMany() operation. We get the following error:

$ mongo <connection-string> --eval 'db.trainingData.deleteMany({"data.intent" : "FIN INTENTION STANDARD"})'

. . .
. . .
. . .

WriteError({
        "index" : 0,
        "code" : 50,
        "errmsg" : "Request timed out.",
        "op" : {
                "q" : {
                        "data.intent" : "FIN INTENTION STANDARD"
                },
                "limit" : 0
        }
})

We have disabled throughput limiting on our Azure Cosmosdb instance but it doesn't solve the issue

enter image description here

Any idea as to why this is not working?

Upvotes: 0

Views: 1079

Answers (1)

Elouan Keryell-Even
Elouan Keryell-Even

Reputation: 1077

It turns out the issue came from throughput limiting at collection level, which I didn't know was a thing in Azure CosmosDB

By default throughput is limited to 400RU/S (Rate Unit per Second) on every collection

enter image description here

We switched it to Autoscale with a max limit of 10.000RU/s on the few collections involved, and it fixed the timeouts

enter image description here

Upvotes: 0

Related Questions