Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health check timeout message should identify which health check timed out #8869

Open
tjquinno opened this issue Jun 11, 2024 · 0 comments
Open
Labels
3.x Issues for 3.x version branch 4.x Version 4.x enhancement New feature or request health
Projects

Comments

@tjquinno
Copy link
Member

Environment Details

  • Helidon Version: 3.x
  • Helidon SE or Helidon MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

The Helidon code which responds to /health requests applies a timeout (configurable) when it invokes each health check it finds.

The exception does not identify which health check(s) timed out and it would be helpful to developers if it did.

Steps to reproduce

  1. Start with the MP QuickStart app.
  2. Add this to the microprofile-config.properties file: health.timeout-millis=1000
  3. Add this class to the project:
    @Liveness
    @ApplicationScoped
    public class SlowLivenessCheck implements HealthCheck {
        @Override
        public HealthCheckResponse call() {
            try {
                TimeUnit.SECONDS.sleep(5);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            return HealthCheckResponse.named("SlowLivenessCheck")
                    .up()
                    .build();
        }
    }
  4. mvn package -DskipTests
  5. java -jar target/helidon-quickstart-mp.jar
  6. From another window: curl http://localhost:8080/health
  7. In the original window you see this (partial) stack trace, noting the timeout as the problem but not identifying the offending health check:
    2024.06.11 06:32:29 SEVERE io.helidon.health.HealthSupport Thread[#86,ft-mp-schedule-1,10,main]: Failed to call health checks
    java.util.concurrent.TimeoutException
    
@tjquinno tjquinno added enhancement New feature or request health 3.x Issues for 3.x version branch 4.x Version 4.x labels Jun 11, 2024
@tjquinno tjquinno added this to Triage in Backlog via automation Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues for 3.x version branch 4.x Version 4.x enhancement New feature or request health
Projects
Backlog
  
Triage
Development

No branches or pull requests

1 participant