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

fix(healthcheck): Add a 2 second timeout to the healthchecks #1674

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

iainsproat
Copy link
Contributor

@iainsproat iainsproat commented Jul 7, 2023

Description & motivation

Addresses issue identified in #1649 (comment)
We cause the request itself to timeout if no response within 2 seconds, rather than relying on the healthcheck to timeout (this seemed to return a -1 or 127 status code). Relying on the healthcheck timeout seemed to cause docker to retry the healthcheck rather than restart the container.

If the healthcheck fails for any reason, the exit code must be 1 as this is the only exit code that docker identifies as 'unhealthy'.

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

@iainsproat iainsproat marked this pull request as ready for review July 7, 2023 15:02
@iainsproat iainsproat merged commit a0a39bd into main Jul 7, 2023
@iainsproat iainsproat deleted the iain/docker-compose-healthcheck branch July 7, 2023 15:22
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

Successfully merging this pull request may close these issues.

1 participant