Intermitent error when using provided health checks #631
Replies: 1 comment 1 reply
|
Would you be able to share the stack trace when the Revisiting our documentation page there, I'm planning on doing a rewrite of the health check content. Different types of health checks can be implemented based on your deployment scenario, but perhaps calling an HTTP endpoint from inside the hosted service itself might not be the best idea. Within IdentityServer, you may rather want to check that the databases are ready, for example using EF Core's health check functionality: services.AddHealthChecks()
.AddDbContextCheck<ConfigurationDbContext>(tags: ["ready"])
.AddDbContextCheck<PersistedGrantDbContext>(tags: ["ready"]);
app.MapHealthChecks("/health/live", new() { Predicate = _ => false });
app.MapHealthChecks("/health/ready", new() { Predicate = r => r.Tags.Contains("ready") }); |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
I've added the health checks as documented here. My issue is with both health checks. Every couple of hours I get the error:
Object reference not set to an instance of an object.when calling the linevar result = await handler.ProcessAsync(_httpContextAccessor.HttpContext);. I've added additional checks to make sure neither things are null:Any ideas what I should look at?
All reactions