Performance: Custom properties for tuning for Formplayer service Hikari DB connection pool #6256
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.
Manual review of long-request timings from APM surfaced very out-of-spec request timing for what should be a nearly constant time cache check
Further investigation confirmed that the actual db lookups are completing in expected latencies (~10ms) but that in certain load conditions the db request pool is starving prematurely before server load is affected (likely exacerbated by occasional bursty request load per machine, note the asymmetry in backlogging below).
This change increases the availability of the connection pool at peak and reduces reserved connections. After deployment we will monitor the same metrics to confirm that we are no longer developing backlogs for low-latency timings.
This change won't impact any average baseline request timings, but should eliminate a significant source of variance in otherwise performant requests.
Further details in change request: https://dimagi.atlassian.net/browse/SAAS-15447
New DB connection pool configuration for production:
Config options docs: https://github.com/brettwooldridge/HikariCP?tab=readme-ov-file#gear-configuration-knobs-baby
Environments Affected
Production