Cosmos DB Error: Request rate is large

Asked

Viewed 98 times

2

I’m making a filter to get the last record sent to a collection by a device and the query is very simple:

db.getCollection('Device').find({'ID':'1234'}).sort({DateTime: -1}).limit(1)

however, if I do limit(1) it gives error the following error:

"Request rate is large".

but if you do limit 2 or 3 or 10 or n works.

inserir a descrição da imagem aqui

  • I read a few things of choosing the cosmos server in the region closest to the server due to the performance but nothing concrete of the problem itself beyond the message. An alternative, even if "improper", would be to treat the recovery with limit 2

  • Yes... I am doing with limit 2 and in the service layer (a nodejs) I return only the first item. It is so in production today. I will search the region, thanks for the help :)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.