Cosmos DB Mongo API recieved Error 50 (ExceededTimeLimit) while attempting to read from an empty collection

Fechter Florian 26 Reputation points
2025-01-28T10:19:23.91+00:00

Hey Guys,

we encountered an issue with our Cosmos DB for Mongo DB 4.3.
When we execute the same request (using mongoose 5.13), it fails randomly (error code 50 ExceededTimeLimit).
The confusing part is that the db table is still empty.
We took a look at the mongodb status page, but there was now error displayed.
Also, the same system configuration worked last week.
After some trial and error how to solve the issue, we recreated the table and added a single dummy data. That seems to have worked, but we're still not sure if that was really the problem.

So we wanted to ask if there is someone with a similar experience or an idea why an empty table could lead to an ExceededTimeLimit error?

Thanks in advance.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,745 questions
{count} votes

Accepted answer
  1. Sai Raghunadh M 2,230 Reputation points Microsoft Vendor
    2025-01-29T15:30:16.63+00:00

    Hi @Fechter Florian

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    we encountered an issue with our Cosmos DB for Mongo DB 4.3. When we execute the same request (using mongoose 5.13), it fails randomly (error code 50 ExceededTimeLimit). The confusing part is that the db table is still empty. We took a look at the mongodb status page, but there was now error displayed. Also, the same system configuration worked last week. After some trial and error how to solve the issue, we recreated the table and added a single dummy data. That seems to have worked, but we're still not sure if that was really the problem.

    So we wanted to ask if there is someone with a similar experience or an idea why an empty table could lead to an ExceededTimeLimit error?

    Solution:

    as mentioned, we recreated the table and added a single dummy data. Since then we got almost no errors. I'm not sure if the recreation of the table or the adding some data fixed the issue (which would be still strange enough). It's just odd that other database with greater workload and data stored (having the same RU limit) ran smoother during the same period.

    If you have any other questions or are still running into more issues, please let me know. Thank you again for your time and patience throughout this issue.

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.


1 additional answer

Sort by: Most helpful
  1. Sai Raghunadh M 2,230 Reputation points Microsoft Vendor
    2025-01-28T11:05:42.8133333+00:00

    Hi @ Fechter Florian

    Thanks for the Question and using Microsoft Q&A

    As per my understanding you are facing the ExceededTimeLimit error 50 for your Cosmos DB for Mongo DB.

    These may be due to various reasons even with an empty collection.

    Here are few suggestions that might solve the issue.

    Make sure the allocated RUs for your collection are sufficient. If they're too low, the request might time out. I recommend increasing the RUs for your collection.

    Enable Server Side Retry (SSR) to automate operation retries. SSR retries requests across all collections in your account with short delays. If a 60-second timeout is reached, a client receives an ExceededTimeLimit exception (50).

    Please go through these Documentations that might help you:

    Prevent rate-limiting errors for Azure Cosmos DB for MongoDB operations

    https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/error-codes-solutions

    https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/troubleshoot-common-issues

    Hope this helps. Do let us know if you any further queries. If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.