-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Execute the MongoDB Connection Health Check on Startup #45482
Comments
/cc @geoand (kubernetes), @iocanel (kubernetes), @jmartisk (health), @loicmathieu (mongodb), @xstefank (health) |
Makes sense IMO |
Looking at the code, it should work as expected. What version of Quarkus are you using? |
I am using 3.17.6 |
Thanks! |
#45523 fixes the issue |
Hi @geoand, |
I would need a sample application that behaves as you describe to be able to figure out what's going on |
I updated the reproducer to version 3.17.8 and disabled
|
@xstefank please take a look at ^ |
Hi @Inithron, I understand what you are after but the problem described in this issue is really fixed by @geoand's PR. Basically, the Mongo health check is designed in this way to wait for the timeout to run out. But personally I don't see anything wrong with your idea, I just moved it to a new issue, since it's really a new feature - #45924. If no one will object, I can implement it. |
Description
It would be great if the MongoDB Connection Health Check could be improved.
Current behavior
After startup following health check is displayed:
But this status is misleading / wrong. Even if no database is available, the status is UP. Only when the application tries to store the first message in the DB, the status goes to down:
Improvement
It would be great, if the connection to the DB would be checked on startup and not when the application tries to store the first message in the DB.
Benefit
With this changed approach the pod in Kubernetes would never get green if there is a wrong connection string or the DB is down.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: