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

Long waiting of the "healthy" status #3

Open
andrey-thm opened this issue Jul 5, 2024 · 3 comments
Open

Long waiting of the "healthy" status #3

andrey-thm opened this issue Jul 5, 2024 · 3 comments

Comments

@andrey-thm
Copy link

andrey-thm commented Jul 5, 2024

It takes too much time for waiting for healthy status of this container. It would be great to change the default setting to something shorter, e.g.:

HEALTHCHECK --interval=1s --timeout=1s --retries=15 --start-period=15s --start-interval=1s \
    CMD netstat -ltn | grep -c 783
@axllent
Copy link
Owner

axllent commented Jul 5, 2024

Unfortunately --start_interval is not a globally-supported Docker command ~ depending on what docker port one is using (for instance I'm using docker.io which does not support that). I'm also a bit hesitant to run the check every second (by default) as that seems quite excessive. Would --interval=5s --start-period=15s --timeout=1s work better for you?

On a side note, I'm assuming you do know that you also can set your own healthcheck command when you start a Docker container?

@andrey-thm
Copy link
Author

It is just netstat and grep, it cost nothint, it it why I prefer to save my time waiting for the container to be ready and set 1s.

But it is up to you, I can always override it in my in my setup. I just wanted to highlight that 1 minute waiting is too long.

@axllent
Copy link
Owner

axllent commented Jul 5, 2024

Point noted, and I agree with the 1m interval being too high! I have reduced it to a 5s interval. Hopefully this solves your delay issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants