Skip to content

Commit efd6863

Browse files
authored
Merge pull request #209834 from ealsur/users/ealsur/503substatus
Cosmos SDK - HTTP 503 substatus documentation
2 parents 0605750 + 4a1e887 commit efd6863

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

articles/cosmos-db/sql/troubleshoot-service-unavailable.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to diagnose and fix Azure Cosmos DB service unavailable e
44
author: rothja
55
ms.service: cosmos-db
66
ms.subservice: cosmosdb-sql
7-
ms.date: 08/19/2022
7+
ms.date: 08/31/2022
88
ms.author: jroth
99
ms.topic: troubleshooting
1010
ms.reviewer: mjbrown
@@ -20,25 +20,42 @@ It is important to make sure the application design is following our [guide for
2020
When evaluating the case for service unavailable errors:
2121

2222
* What is the impact measured in volume of operations affected compared to the operations succeeding? Is it within the service SLAs?
23-
* Is the P99 latency affected?
23+
* Is the P99 latency / availability affected?
2424
* Are the failures affecting all your application instances or only a subset? When the issue is reduced to a subset of instances, it's commonly a problem related to those instances.
2525

2626
## Troubleshooting steps
27+
2728
The following list contains known causes and solutions for service unavailable exceptions.
2829

30+
### Verify the substatus code
31+
32+
In certain conditions, the HTTP 503 Service Unavailable error will include a substatus code that helps to identify the cause.
33+
34+
| SubStatus Code | Description |
35+
|----------|-------------|
36+
| 20001 | The service unavailable error happened because there are client side [connectivity issues](#client-side-transient-connectivity-issues) (failures attempting to connect). The client attempted to recover by [retrying](conceptual-resilient-sdk-applications.md#timeouts-and-connectivity-related-failures-http-408503) but all retries failed. |
37+
| 20002 | The service unavailable error happened because there are client side [timeouts](troubleshoot-dot-net-sdk-request-timeout.md#troubleshooting-steps). The client attempted to recover by [retrying](conceptual-resilient-sdk-applications.md#timeouts-and-connectivity-related-failures-http-408503) but all retries failed. |
38+
| 20003 | The service unavailable error happened because there are underlying I/O errors related to the operating system. See the exception details for the related I/O error. |
39+
| 20004 | The service unavailable error happened because [client machine's CPU is overloaded](troubleshoot-dot-net-sdk-request-timeout.md#high-cpu-utilization). |
40+
| 20005 | The service unavailable error happened because client machine's threadpool is starved. Verify any potential [blocking async calls in your code](https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#avoid-using-taskresult-and-taskwait). |
41+
| >= 21001 | This service unavailable error happened due to a transient service condition. Verify the conditions in the above section, confirm if you have retry policies in place. If the volume of these errors is high compared with successes, reach out to Azure Support. |
42+
2943
### The required ports are being blocked
44+
3045
Verify that all the [required ports](sql-sdk-connection-modes.md#service-port-ranges) are enabled.
3146

3247
### Client-side transient connectivity issues
48+
3349
Service unavailable exceptions can surface when there are transient connectivity problems that are causing timeouts and can be safely retried following the [design recommendations](conceptual-resilient-sdk-applications.md#timeouts-and-connectivity-related-failures-http-408503).
3450

3551
Follow the [request timeout troubleshooting steps](troubleshoot-dot-net-sdk-request-timeout.md#troubleshooting-steps) to resolve it.
3652

3753
### Service outage
38-
Check the [Azure status](https://azure.status.microsoft/status) to see if there's an ongoing issue.
3954

55+
Check the [Azure status](https://azure.status.microsoft/status) to see if there's an ongoing issue.
4056

4157
## Next steps
58+
4259
* [Diagnose and troubleshoot](troubleshoot-dot-net-sdk.md) issues when you use the Azure Cosmos DB .NET SDK.
4360
* [Diagnose and troubleshoot](troubleshoot-java-sdk-v4-sql.md) issues when you use the Azure Cosmos DB Java SDK.
4461
* Learn about performance guidelines for [.NET](performance-tips-dotnet-sdk-v3-sql.md).

0 commit comments

Comments
 (0)