诊断和排查“Azure Cosmos DB 服务不可用”异常Diagnose and troubleshoot Azure Cosmos DB service unavailable exceptions

适用于: SQL API

此 SDK 无法连接到 Azure Cosmos DB。The SDK wasn't able to connect to Azure Cosmos DB.

疑难解答步骤Troubleshooting steps

下面的列表包含“服务不可用”异常的已知原因和解决方案。The following list contains known causes and solutions for service unavailable exceptions.

所需端口被阻止The required ports are being blocked

验证所有必需的端口是否已启用。Verify that all the required ports are enabled.

客户端暂时性连接问题Client-side transient connectivity issues

当存在导致超时的暂时性连接问题时,可能会出现“服务不可用”异常。Service unavailable exceptions can surface when there are transient connectivity problems that are causing timeouts. 通常,与此情况相关的堆栈跟踪将包含 TransportException 错误。Typically, the stack trace related to this scenario will contain a TransportException error. 例如:For example:

TransportException: A client transport error occurred: The request timed out while waiting for a server response. 
(Time: xxx, activity ID: xxx, error code: ReceiveTimeout [0x0010], base error: HRESULT 0x80131500

请按照请求超时故障排除步骤解决此问题。Follow the request timeout troubleshooting steps to resolve it.

服务中断Service outage

检查 Azure 状态,了解是否有正在发生的问题。Check the Azure status to see if there's an ongoing issue.

后续步骤Next steps