-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Healthcheck not working as expected #2073
Comments
Same problem on 270 |
I have made some modifications in the upcoming version.
|
Will re-test after the release and let you know if it works, thanks |
Let me know if it still does not work |
I tried to re deploy my app today, without code changes and the health check is having error. I'm on v4.0.0-beta.271. Curl inside the docker works as expected |
I added a log when accessing the root path, that should be the default health path. This is how it looks a deployment, first is the current docker and the second one is the one being deployed and the print "GET /", doesn't show on the second one, meaning it doesn't call the health url. additional: once using a custom health url, I couldn't revert to the use the panel config after deleting. Seems it kept the custom health url persisted. |
Can you please show me the healthcheck configuration page? Also, is your app based on dockerfile buildpack? |
Hey @andrasbacsai , i also checked my health check now with 271. I use the same health check configuration as in my original post: My issues seems to be resolved now. The startup time is now awaited and i now see the logs of my defined route, which is called in the interval i provided! 馃憤馃徏 I have the following points still in mind:
Edit: The logs are shown when i call the health url via postman while the db is unaccessible. 馃 |
Hi, why I am not getting any healthchecks option in the ui? I tried docker compose project. Any idea? using 272. Thanks |
This is not related with this bug. Please create another issue, discussion or ask on discord! |
EDIT: Wrong configuration on my side, sorry^^ But the logs are still not shown as mentioned above. |
I'm also having issues with health checks failing, but only when the Build Pack is set to Dockerfile and the version of Coolify is greater than v4.0.0-beta.270. Part of Deployment Log on v4.0.0-beta.274 (fails):
Part of Deployment Log on v4.0.0-beta.270 (passes):
I'm using the Dockerfile from the nextjs with-docker example, on a newly created next project. The health check settings are the default, with only the port changed to 3000. Downgrading to 270 or disabling the health check allows the deployment to succeed. |
No matter how I try to replicate this issue, I cannot. Healthcheck is working on older version of Coolify version with Dockerfile buildpack, because there was basically no healthcheck (exit 0 command was used, so it always returns true). @lewisdewsbury Your nextjs applications returns a 200 on path / ? |
But could you reproduce my two problems?
Also i would like to hear your opinion about my suggestion to the startPeriod to not await it, but don't count up the attempts while in this period. |
Hi andras, I've tracked down the cause of my issue, everything is now working perfectly on 274. The problem was not having curl installed on the runner. The Dockerfile was based on node:18-alpine, which does not have curl installed by default. Installing curl on the runner, or changing the base image to node:18 allowed the health checks to pass. Thank you for your help, it got me looking in the right direction 馃憤 |
I had the exact same problem as @lewisdewsbury. Started having the healthcheck not working on version |
I had the same issue. @andrasbacsai you can close the issue now. |
I will make a few changes. Coolify will check if curl or wget is available. If neither, it will try to use the proc filesystem for hc, or just pass healthy state. Not sure yet. |
@andrasbacsai did you already looked at these three points? |
You mean if your app is running for a while and the healthy status changes somehow? There is not notification yet for that.
|
About 1: Yes, this notification would be awesome! I would be notified directly if my service is unhealthy and i can the look into it why. About 2: My application is an express backend. I log every request. Successfully requests about the health url are logged correctly. When i turn off my postgres, which causes the health check to return an error, the container status is updated correctly (so the requests are send i guess), but there are absolut no logs about these failed requests in my logs. When i then manually call the health check url via postman there is a log. Thats quite weird About 3: Thats my suggestion to faster have a healthy container. By not awaiting the start period, but not count up failed attempts this could be arcvhieved. |
@andrasbacsai should i create a separate issue for these points? |
I opened a feature discussion about point 1 & 3: #2200 |
so do we need to do the healthcheck from inside the container ? I always thought healthcheck should be observed from outside the docker container. |
Is there a way to get the old "healthcheck" ? It works perfectly for my use case (knowing if the app is running when accessed from outside docker) |
previously it wasn't doing anything, you can disable the healthcheck |
before:
currently:
|
Description
After a longer email conversation with andras about health checks i want to track the last bugs around health-checks i have here. Thanks for all the help so far 馃憤馃徏
Before i had this configuration in my dockerfile:
Now i have this configuration:
The two problems i have are:
start period
, because in my deployment logs the health check is performed immediately and the attempts are counted up. Is this value used?In my health check i check the database connection. As a test i shut down the database. 5 minutes later the backend resource was still marked as "healthy" so i think the health check is not really executing
Minimal Reproduction (if possible, example repository)
Please let me know if you need a reproduction and what this should contain
Exception or Error
No response
Version
v4.0.0-beta.266
The text was updated successfully, but these errors were encountered: