-
Notifications
You must be signed in to change notification settings - Fork 841
Open
Labels
Description
Given this source code
builder.Services.AddHealthChecks()
.AddAzureCosmosDB(optionsFactory: static (sp) =>
{
CosmosDbOptions cosmosConfig = sp.GetRequiredService<IOptions<CosmosDbOptions>>().Value;
return new AzureCosmosDbHealthCheckOptions
{
DatabaseId = cosmosConfig.DatabaseName,
ContainerIds = [Constants.ConversationContainerName]
};
}, tags: ["Database"], timeout: TimeSpan.FromSeconds(2))
It works most of the time, but sometimes I find exception like this in the log, why?
I think it's weird I get a timeout exception, while Cosmos replied 200 OK in the expected time.
Environment:
- .NET 8 version
- AspNetCore.HealthChecks.CosmosDb version 8.0.0
- Linux Azure App Service
dearsi-mocha and tiaringhio