fix: reduce healthcheck frequency to lower memory pressure#4325
Merged
Siumauricio merged 1 commit intocanaryfrom Apr 29, 2026
Merged
fix: reduce healthcheck frequency to lower memory pressure#4325Siumauricio merged 1 commit intocanaryfrom
Siumauricio merged 1 commit intocanaryfrom
Conversation
Closes #3909 The previous 10s interval triggered a DB query (SELECT 1) 360 times/hour, keeping Node.js heap under constant pressure and preventing the GC from reclaiming memory efficiently. Increasing to 30s reduces query load by 3x. Also adds start-period=60s to avoid false failures during startup.
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.
Closes #3909
The
HEALTHCHECKwas configured with--interval=10s, which triggered a real PostgreSQL query (SELECT 1) 360 times/hour. This kept the Node.js heap under constant pressure, preventing the GC from reclaiming memory efficiently — causing ~350MB of extra memory usage compared to baseline.Changes
--interval:10s→30s(3x fewer DB queries)--timeout:3s→5s(more margin under load)--start-period: added60s(avoids false failures during Next.js startup)--retries:10→5(was excessive)Greptile Summary
This PR tunes the
HEALTHCHECKinstruction in the Dockerfile to reduce the frequency of health queries, lowering constant pressure on the Node.js heap. The four parameter changes (--interval10s→30s,--timeout3s→5s, new--start-period=60s,--retries10→5) are individually sensible and collectively reasonable for a Next.js + Postgres container that takes time to boot. No issues were found.Confidence Score: 5/5
Safe to merge — single-line Dockerfile change with no logic or security implications.
The only change is adjusting HEALTHCHECK timing parameters, which is a well-justified, low-risk tweak. No new code paths, no security surface changes, and no behavioral regressions are introduced.
No files require special attention.
Reviews (1): Last reviewed commit: "fix: reduce healthcheck frequency to low..." | Re-trigger Greptile