Diagnosing Spring Boot Actuator Health DOWN and OUT_OF_SERVICE Statuses
Use /actuator/health to identify which component or custom HealthIndicator is causing a DOWN or OUT_OF_SERVICE status, then apply the matching fix.
13 Oct 2026, 00:09 UTC

Problem: /actuator/health returns DOWN or OUT_OF_SERVICE
A Spring Boot application with Actuator installed exposes /actuator/health. The endpoint aggregates status from components such as db, diskSpace, ping, and any custom HealthIndicator beans. A HealthIndicator is a Spring component that implements org.springframework.boot.actuate.health.HealthIndicator and reports application-specific health. When any component reports DOWN or OUT_OF_SERVICE, the overall status becomes the worst status among them.
Useful takeaway: do not restart the application as the first response. Restarting can hide the failing dependency and drop in-flight requests. Instead, read the component-level details, match the failing component to a likely cause, and apply the targeted fix.
Cause and diagnostic table
| Observed component | Likely cause | Diagnostic signal |
|---|---|---|
| db | Database connection pool exhausted or database unreachable | Connection timeout or refused connection in the db error block |
| diskSpace | Free disk space below the Actuator threshold | Disk space error showing the path and threshold |
| custom indicator name | Unhandled exception in HealthIndicator.health() | Exception stack trace inside the component details |
| downstream service | Cascading failure from a called dependency | Read timeout or HTTP error in custom indicator or application logs |
| missing component | Missing starter or auto-configuration not triggered | Expected component absent from the JSON response |
Ordered checks
- Confirm Actuator is exposed and reachable.
- Enable component details for diagnosis.
- Correlate the failing component with recent changes.
- Verify the dependency directly.
- Inspect custom HealthIndicator code.
curl -s -i http://:/actuator/health
Run from a machine with network access to the application port, such as a workstation or bastion host. Required permission: network reachability only; add -H 'Authorization: Bearer ' if the endpoint is protected. Expected check: HTTP 200 and a JSON body containing a top-level status field. Risk: if details are enabled, the response may expose database names, disk paths, or internal component states; do not paste it into public tickets.
# application.properties
management.endpoints.web.exposure.include=health
management.endpoint.health.show-details=always
Apply this in a non-production environment first, or limit it to an authenticated operator in production. Expected check: the JSON response now includes a details block for db, diskSpace, and custom indicators. Risk: leaving show-details=always in production leaks internal information.
Match the DOWN or OUT_OF_SERVICE component in the table above to recent deployments, infrastructure changes, or dependency version bumps. Check application logs for the same component name and timestamp.
For db, attempt a connection from the application host using the configured JDBC URL and credentials. For diskSpace, check free space on the host path reported in the details block. For downstream services, call the dependency endpoint directly from the application host to confirm reachability and latency.
Look for HealthIndicator.health() methods that throw exceptions instead of returning a Health.down() result. Review recent changes to those classes.
Fixes tied to findings
- db DOWN: increase the database connection pool size or restore database connectivity.
# application.properties
spring.datasource.hikari.maximum-pool-size=25
Coordinate the pool size with database administrators; a pool that is too large can overwhelm the database. Re-curl /actuator/health after redeployment to confirm db reports UP.
After remediation, request /actuator/health with details enabled and confirm diskSpace reports UP.
public Health health() {
try {
boolean ok = checkDependency();
return ok ? Health.up().build() : Health.down().withDetail('reason', 'dependency unreachable').build();
} catch (Exception ex) {
return Health.down(ex).withDetail('component', 'custom-indicator').build();
}
}
If the custom indicator calls a downstream service, add a timeout and circuit-breaker so one slow dependency does not cascade to the application health status.
Confirm the component appears in /actuator/health after the application restarts.
Escalation criteria
- Page on-call if health remains DOWN after dependency and code remediation.
- Escalate immediately if OUT_OF_SERVICE affects user-facing instances.
- Escalate if /actuator/health details are unavailable because of security configuration and the failing component cannot be identified from logs.
Limitations and practical verification
An UP status does not verify uninstrumented dependencies or business logic correctness. Supplement with synthetic transaction checks that exercise the actual code path.
Actuator behavior and default detail exposure differ between Spring Boot 2.x and 3.x. Confirm property names and JSON structure against the reference documentation for the version declared in your build file.
Practical check after applying a fix: request /actuator/health with details enabled and confirm the previously failing component now reports UP and the top-level status is UP. Watch application logs for the same component to confirm errors have stopped.
Revert diagnostic configuration
Changing management.endpoint.health.show-details to always changes runtime state. After diagnosis, revert it to never or when_authorized in production to avoid exposing internal component details.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.