Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
3.98k stars 770 forks source link

CosmosDB Health Check endpoint fails to honor timeout paramerter. #2212

Closed Mncool closed 1 month ago

Mncool commented 1 month ago

https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/2f6a10f89e3c6d97f232f4157a80e3a9e1470dc5/src/HealthChecks.CosmosDb/AzureCosmosDbHealthCheck.cs#L34C13-L35C1

_cosmosClient.ReadAccountAsync() doesn't pass the cancellation token to the method, thus it's not able to break on token cancellation.

Mncool commented 1 month ago

Closing as I did not understand the cosmos nuget package before creating ticket.

Cosmos nuget has a 3 time retry policy with different requesttimeouts.