-
Notifications
You must be signed in to change notification settings - Fork 37
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
Liveness Health Check getting executed on eventloop threads even after adding @Blocking annotation #537
Comments
Can you try similar code logic `import io.smallrye.health.api.AsyncHealthCheck; @readiness
} |
Hi @snavlani, this is not the correct place for this issue since the executing thread is specific to Quarkus. But I'll respond here. In SR health (Quarkus integration) @Liveness
public class BlockingHealthCheck implements HealthCheck {
@Override
public HealthCheckResponse call() {
System.out.println(getClass().getName() + ": " + Thread.currentThread().getName());
return HealthCheckResponse.up("blocking");
}
} and @Liveness
public class NonblockingHealthCheck implements AsyncHealthCheck {
@Override
public Uni<HealthCheckResponse> call() {
System.out.println(getClass().getName() + ": " + Thread.currentThread().getName());
return Uni.createFrom().item(HealthCheckResponse.up("async"));
}
} you'll see that your code is always run on the correct thread. It shouldn't happen that So if it does, please file the issue in the quarkus repository. Basically if it might happen that Here is the reproducer https://github.com/xstefank/quarkus-reproducers/tree/main/health-thread. |
We implemented a custom health check as mentioned below
We enabled quarkus HTTP debug logs and got to know that some of the liveness check requests were being executed using eventloop threads (Most of the requests were executed by executor threads).
Whenever eventloop threads execute the requests, it takes around 30 seconds to respond due to which kubernetes liveness check fails (As we have configured it to wait for maximum 30 seconds).
Even after adding @Blocking annotation why the requests are executed by eventloop threads ?
The text was updated successfully, but these errors were encountered: