You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/sql/troubleshoot-service-unavailable.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to diagnose and fix Azure Cosmos DB service unavailable e
4
4
author: rothja
5
5
ms.service: cosmos-db
6
6
ms.subservice: cosmosdb-sql
7
-
ms.date: 08/19/2022
7
+
ms.date: 08/31/2022
8
8
ms.author: jroth
9
9
ms.topic: troubleshooting
10
10
ms.reviewer: mjbrown
@@ -20,25 +20,42 @@ It is important to make sure the application design is following our [guide for
20
20
When evaluating the case for service unavailable errors:
21
21
22
22
* 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?
24
24
* 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.
25
25
26
26
## Troubleshooting steps
27
+
27
28
The following list contains known causes and solutions for service unavailable exceptions.
28
29
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
+
29
43
### The required ports are being blocked
44
+
30
45
Verify that all the [required ports](sql-sdk-connection-modes.md#service-port-ranges) are enabled.
31
46
32
47
### Client-side transient connectivity issues
48
+
33
49
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).
34
50
35
51
Follow the [request timeout troubleshooting steps](troubleshoot-dot-net-sdk-request-timeout.md#troubleshooting-steps) to resolve it.
36
52
37
53
### Service outage
38
-
Check the [Azure status](https://azure.status.microsoft/status) to see if there's an ongoing issue.
39
54
55
+
Check the [Azure status](https://azure.status.microsoft/status) to see if there's an ongoing issue.
40
56
41
57
## Next steps
58
+
42
59
*[Diagnose and troubleshoot](troubleshoot-dot-net-sdk.md) issues when you use the Azure Cosmos DB .NET SDK.
43
60
*[Diagnose and troubleshoot](troubleshoot-java-sdk-v4-sql.md) issues when you use the Azure Cosmos DB Java SDK.
44
61
* Learn about performance guidelines for [.NET](performance-tips-dotnet-sdk-v3-sql.md).
0 commit comments