fix(docker): use HEAD probe so SSE heartbeat doesn't time out healthcheck#1182
Merged
magyargergo merged 1 commit intoApr 29, 2026
Conversation
…heck `/api/heartbeat` is a `text/event-stream` endpoint that keeps the connection open and streams events. `curl -fsS` reads until the body ends, which never happens, so every probe hits the 5s timeout and Docker marks the server unhealthy — which in turn blocks `gitnexus-web` from starting via `condition: service_healthy`. Switch to `curl -fsSI` (HEAD): the server still returns 200 instantly, but there's no body to read so curl exits cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@R09722akaBennett is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Apr 30, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug:
docker compose up -dfails with dependency failed to start: container gitnexus-server is unhealthy even though the server is running and serving requests.Root cause: the compose healthcheck uses
curl -fsS http://localhost:4747/api/heartbeat, but that endpoint returns Content-Type: text/event-stream and keeps the connection open indefinitely. The 200 status arrives instantly, but curl reads until the body ends — which it never does — so every probe trips the 5s timeout and Docker marks the container unhealthy. gitnexus-web then refuses to start because of its condition: service_healthy dependency.Fix: switch the probe to
curl -fsSI (HEAD). Same 200, no body, curl exits cleanly. Verified locally: gitnexus-server reports healthy and gitnexus-web starts.