Diagnose and troubleshoot Azure Cosmos DB request timeout exceptions

APPLIES TO: NoSQL

Azure Cosmos DB returned an HTTP 408 request timeout.

Troubleshooting steps

The following list contains known causes and solutions for request timeout exceptions.

Check the SLA

Check Azure Cosmos DB monitoring to see if the number of 408 exceptions violates the Azure Cosmos DB SLA.

Solution 1: It didn't violate the Azure Cosmos DB SLA

The application should handle this scenario and retry on these transient failures.

Solution 2: It did violate the Azure Cosmos DB SLA

Contact Azure Support.

Hot partition key

Azure Cosmos DB distributes the overall provisioned throughput evenly across physical partitions. When there's a hot partition, one or more logical partition keys on a physical partition are consuming all the physical partition's Request Units per second (RU/s). At the same time, the RU/s on other physical partitions are going unused. As a symptom, the total RU/s consumed will be less than the overall provisioned RU/s at the database or container. You'll still see throttling (429s) on the requests against the hot logical partition key. Use the Normalized RU Consumption metric to see if the workload is encountering a hot partition.

Solution:

Choose a good partition key that evenly distributes request volume and storage. Learn how to change your partition key.

Next steps