Repository navigation
feat(db): make the [DB POOL] slow-acquire warning threshold configurable - #5397
Merged
Merged
Conversation
HINDSIGHT_API_DB_POOL_SLOW_ACQUIRE_THRESHOLD_SECONDS (default 0.05, 0 disables) replaces the hardcoded 50 ms in both acquire paths. Cold TLS connections to Aurora Serverless routinely take 60-85 ms and flooded warning dashboards. Closes #5274
…e legacy path - _is_slow_acquire used get_config(), which builds a StaticConfigProxy per call (~0.3 ms) on every acquire; use the cached raw config instead. - Test both acquire paths (backend and raw asyncpg pool).
nicoloboschi
force-pushed
the
fix/configurable-slow-acquire-threshold
branch
from
October 7, 2026 13:12
7b99add to
de06f91
Compare
This was referenced Oct 8, 2026
Merged
This was referenced Oct 16, 2026
Merged
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 #5274.
The
[DB POOL] Slow acquirewarning fired at a hardcoded 50 ms. On Aurora Serverless v2 a new TLS connection routinely takes 60–85 ms, so a healthy pool flooded warning dashboards.HINDSIGHT_API_DB_POOL_SLOW_ACQUIRE_THRESHOLD_SECONDS(default0.05, unchanged behaviour).0turns the warning off..env.example(+ embed copy).Not done: adding
size=/idle=to the backend-path message — the backend interface doesn't expose pool stats today.