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.
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
– BrTkCa
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 :)
– Ricardo Castro Martin