Govind Kanshi
1 min readDec 3, 2020

--

Troubleshooting 503 or service unavailable error in CosmosDB

CosmosDB status codes are published here for reference. 503 server side errors can be detected on the CosmosDB backend for SQL API with help of Azure Monitor (you need to split by status code the Total requests) and Azure Diagnostics(need to look for status code in DataPlaneRequests for SQL API). You can create Azure Monitor alerts on their occurrence. If you receive multiple serverside 503 errors then definitely you should reach out to support.

SQL API’s client SDK too can throw the 503 errors in case it is unable to make connection with backend service. You should get full stack trace, status code, substatus code of this exception to debug further. It could be due to

Resolution here is to retry the action again. On client side if you get too many of these errors —check the connectivity between the client and backend..

--

--

Govind Kanshi

I help create reliable, pragmatic software solutions using the dainty words like Cloud and Data. I work at Azure Cosmos DB team.