Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: ServiceUnavailable (503); Substatus: 20001;

Rajeshwar Reddy Chowdepalli 61 Reputation points Microsoft Employee
2023-11-03T14:55:55.21+00:00

I am using Cosmos Client to run a query. I am getting this error continuously. I have added retry mechanism and even reran the project multiple times, but I am getting the same error. Is there any change I have to do in the resource to get rid of this error?

Complete Error:

Unhandled exception. Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: ServiceUnavailable (503); Substatus: 20001; ActivityId: ; Reason: (The request failed because the client was unable to establish connections to 4 endpoints across 1 regions. Please check for client resource starvation issues and verify connectivity between client and server. More info: https://aka.ms/cosmosdb-tsg-service-unavailable
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,478 questions
0 comments No comments
{count} votes

Accepted answer
  1. Boris Von Dahle 3,116 Reputation points
    2023-11-03T19:58:03.3566667+00:00

    Hello,

    The error you are facing indicates that the SDK was not able to connect to Azure Cosmos DB.

    Here are some steps to resolve the issue :

    https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/troubleshoot-dotnet-sdk-request-timeout?tabs=cpu-new#troubleshooting-steps

    The error message may also indicates that the request is being blocked by your Cosmos DB account firewall settings. You may need to adjust these settings to allow the request to pass through.

    Please follow the above steps to diagnose and troubleshoot the issue.

    Hope this helps. If it does, please mark this answer as accepted in order for other users with same question to be able to find this topic.

    Regards


0 additional answers

Sort by: Most helpful