Verified finding (surfaced live in the local API log)
The HTTP-based health checks are registered via AddHttpClient<T>() with no .Timeout, and none of the AddCheck<>() registrations set a per-check timeout:. So a slow/unreachable dependency hangs the check on the HttpClient default (100s) — or the OS TCP connect timeout (~75s) hits first.
Observed live:TileServerGL health check ... Unhealthy completed after 75007.674ms ... 'Operation timed out (192.168.0.202:18081)' — a 75-second hang on one probe.
Affected (in ServiceCollectionExtensions.AddHealthChecksConfiguration)
Keycloak_HealthCheck, InfluxDB_HealthCheck, RabbitMQ_HealthCheck, TileServerGlHealthCheck, DnsServerHealthCheck — all AddHttpClient<T>() with no timeout. (DnsServerHealthCheck already bounds its own call internally, but its client was still unbounded.)
Impact
/health aggregates all checks, so one hung HTTP probe can stall the endpoint ~75s. At scale that trips orchestrator/load-balancer health probes and makes the API look down when only a peripheral dependency (tile server, InfluxDB) is degraded.
Fix (in flight)
Bound each health-check HttpClient to 10s in the registration, well under any orchestrator health-check timeout — a down dependency now reports Unhealthy in ~10s instead of ~75s. Adds a [Theory] regression test asserting all five clients are bounded. Fix build-clean + test green.
## Verified finding (surfaced live in the local API log)
The HTTP-based health checks are registered via `AddHttpClient<T>()` with **no `.Timeout`**, and none of the `AddCheck<>()` registrations set a per-check `timeout:`. So a slow/unreachable dependency hangs the check on the HttpClient default (100s) — or the OS TCP connect timeout (~75s) hits first.
**Observed live:** `TileServerGL health check ... Unhealthy completed after 75007.674ms ... 'Operation timed out (192.168.0.202:18081)'` — a **75-second** hang on one probe.
### Affected (in `ServiceCollectionExtensions.AddHealthChecksConfiguration`)
`Keycloak_HealthCheck`, `InfluxDB_HealthCheck`, `RabbitMQ_HealthCheck`, `TileServerGlHealthCheck`, `DnsServerHealthCheck` — all `AddHttpClient<T>()` with no timeout. (`DnsServerHealthCheck` already bounds its own call internally, but its client was still unbounded.)
### Impact
`/health` aggregates all checks, so one hung HTTP probe can stall the endpoint ~75s. At scale that trips orchestrator/load-balancer health probes and makes the API look down when only a peripheral dependency (tile server, InfluxDB) is degraded.
## Fix (in flight)
Bound each health-check HttpClient to **10s** in the registration, well under any orchestrator health-check timeout — a down dependency now reports Unhealthy in ~10s instead of ~75s. Adds a `[Theory]` regression test asserting all five clients are bounded. Fix build-clean + test green.
Resolved in spikersoft-backend PR #104 (merged to master). Bound all five HTTP health-check probes (Keycloak/InfluxDB/RabbitMQ/TileServerGL/DnsServer) to a 10s HttpClient.Timeout in AddHealthChecksConfiguration, so a down/slow dependency reports Unhealthy in ~10s instead of hanging /health ~75s. Added HealthCheckHttpClientTimeoutTests (Theory, 5/5 green) as a regression guard. Closing.
Resolved in spikersoft-backend PR #104 (merged to `master`). Bound all five HTTP health-check probes (`Keycloak`/`InfluxDB`/`RabbitMQ`/`TileServerGL`/`DnsServer`) to a 10s `HttpClient.Timeout` in `AddHealthChecksConfiguration`, so a down/slow dependency reports Unhealthy in ~10s instead of hanging `/health` ~75s. Added `HealthCheckHttpClientTimeoutTests` (Theory, 5/5 green) as a regression guard. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Verified finding (surfaced live in the local API log)
The HTTP-based health checks are registered via
AddHttpClient<T>()with no.Timeout, and none of theAddCheck<>()registrations set a per-checktimeout:. So a slow/unreachable dependency hangs the check on the HttpClient default (100s) — or the OS TCP connect timeout (~75s) hits first.Observed live:
TileServerGL health check ... Unhealthy completed after 75007.674ms ... 'Operation timed out (192.168.0.202:18081)'— a 75-second hang on one probe.Affected (in
ServiceCollectionExtensions.AddHealthChecksConfiguration)Keycloak_HealthCheck,InfluxDB_HealthCheck,RabbitMQ_HealthCheck,TileServerGlHealthCheck,DnsServerHealthCheck— allAddHttpClient<T>()with no timeout. (DnsServerHealthCheckalready bounds its own call internally, but its client was still unbounded.)Impact
/healthaggregates all checks, so one hung HTTP probe can stall the endpoint ~75s. At scale that trips orchestrator/load-balancer health probes and makes the API look down when only a peripheral dependency (tile server, InfluxDB) is degraded.Fix (in flight)
Bound each health-check HttpClient to 10s in the registration, well under any orchestrator health-check timeout — a down dependency now reports Unhealthy in ~10s instead of ~75s. Adds a
[Theory]regression test asserting all five clients are bounded. Fix build-clean + test green.Resolved in spikersoft-backend PR #104 (merged to
master). Bound all five HTTP health-check probes (Keycloak/InfluxDB/RabbitMQ/TileServerGL/DnsServer) to a 10sHttpClient.TimeoutinAddHealthChecksConfiguration, so a down/slow dependency reports Unhealthy in ~10s instead of hanging/health~75s. AddedHealthCheckHttpClientTimeoutTests(Theory, 5/5 green) as a regression guard. Closing.