The client does not attempt to read from other regions
See original GitHub issueDescribe the bug The client does not attempt to read from another region.
To Reproduce The issue is intermittent, it manifests when the primary (write) region is unavailable.
Expected behavior The client automatically tries reading from another available region.
Actual behavior We use GetItemLinqQueryable. The client is configured as follows:
var clientBuilder = new CosmosClientBuilder($"AccountEndpoint={host};AccountKey={accountKey}")
.WithSerializerOptions(new CosmosSerializationOptions { PropertyNamingPolicy = CosmosPropertyNamingPolicy.CamelCase })
.WithThrottlingRetryOptions(maxRetryWaitTimeOnThrottledRequests.ToTimeSpan(), maxRetryAttemptsOnThrottledRequests);
return clientBuilder.Build();
We originally had just one region in West Europe and couple of days ago added a read-only region in North Europe. We did not change the client configuration in any way.
The problem is that we still occasionally get these errors when querying items:
Response status code does not indicate success: ServiceUnavailable (503); Substatus: 0; ActivityId: 61ec3016-6990-4816-87f7-19d08d5b3e2f; Reason: (The request failed because the client was unable to establish connections to 3 endpoints across 1 regions. The client CPU was overloaded during the attempted request.)
Why doesn’t it attempt to reach the second region? Or am I misreading the error message?
Environment summary SDK Version: 3.9.11 OS Version: Windows App Service in Azure
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Great, I was wondering if ApplicationRegion reduces to PreferredRegions behind the scenes. Thanks @ealsur!
Closing due to in-activity, pease feel free to re-open.