1

I'm using Cosmos DB with Gremlin interface and I'm puzzled with the way Cosmos DB calculates RU limit. For example: i have collection provisioned with 400 RU's. Then I run query which sometimes throws RequestTooLargeException (mind that this collection is shared with other users). When i inspected it on portal, it run to completion consuming almost 800 RU according to log. When i run it again it throws error (as above).

Few questions:

  1. why it executed once? Shoudn't it be automatically terminated on RU limit exceeded?
  2. why it cannot be executed again (even after few seconds)
  3. does any parallel request from other users contributing to this effect? E.g. my query overlaps with other user's query?

In other words: what criteria have to be met for Cosmos DB to throw ReuestRateTooLarge?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
Krzysztof
  • 498
  • 5
  • 23
  • 1
    Take a look at my answer [here](https://stackoverflow.com/a/63006251/272109) that explains how your query will be executed, even if you go into "RU debt" - and then the follow-on throttling until you've "paid off" your debt. – David Makogon Dec 04 '20 at 13:47
  • Yes, that sheds some light on the problem. Thank you. – Krzysztof Dec 07 '20 at 08:24

0 Answers0