![cosmic client v2 cosmic client v2](https://i.pinimg.com/736x/79/5c/72/795c72eaec804996b69795bf3f3c345b.jpg)
If you're running on Azure VMs, follow the SNAT port exhaustion guide. NET SDK can hit Azure SNAT (PAT) port exhaustion. When running in Azure, clients using the. The client application that uses the SDK should be scaled up or out. In this case the solution is to investigate the source/s of the thread starvation (potentially locked threads), or scale the machine/s to a larger resource size.
![cosmic client v2 cosmic client v2](https://i.ytimg.com/vi/VU8lEp_CaOg/maxresdefault.jpg)
Use 10 seconds as the interval to monitor maximum (not average) CPU utilization. For optimal latency, CPU usage should be roughly 40 percent. High CPU utilization is the most common case. The following list contains known causes and solutions for request timeout exceptions. Instead, after the time is up, it cancels when it's safe to do so. The operation might not cancel exactly when the time defined in the cancellation is up. The CancellationToken parameter is a mechanism where the library will check the cancellation when it won't cause an invalid state. The cancellation token should be used to define an approximate expected timeout on the operation scope. In between network requests, the cancellation token might be checked and an operation canceled if the related token is expired. This CancellationToken parameter is used throughout the entire operation, across all network requests. CancellationTokenĪll the async operations in the SDK have an optional CancellationToken parameter. This timeout isn't an end-to-end operation request timeout. This configuration would apply for each network request on the retry. An operation started by a user can span multiple network requests (for example, there could be throttling). The CosmosClientOptions.RequestTimeout (or ConnectionPolicy.RequestTimeout for SDK v2) configuration allows you to set a timeout that affects each individual network request. The SDK has two distinct alternatives to control timeouts, each with a different scope. Customize the timeout on the Azure Cosmos DB. The HTTP 408 error occurs if the SDK was unable to complete the request before the timeout limit occurred. Diagnose and troubleshoot Azure Cosmos DB.