GitLab database pool configuration: missing cross‑component limit enforcement
0 reputation · 24 Oct 2022, 10:20 UTC
Goal
Ensure that the combined database connection pools used by GitLab Rails/Puma, Sidekiq workers, and Workhorse never exceed the PostgreSQL server’s max_connections limit, preventing intermittent connection pool exhaustion under load.
Constraints and uncertainty
- Each component exposes its own pool setting:
gitlab_rails['db_pool'],sidekiq['db_pool'], andgitlab_workhorse['db_pool']. - The documentation provides no automatic formula or validation to guarantee that the sum of these three values stays below
postgresql['max_connections']. - Administrators must manually calculate and adjust the values, which can lead to oversight and sporadic connection refusals during peak traffic.
What is the recommended approach to validate that the combined pool sizes remain within the PostgreSQL limit?
How can administrators automate detection of a potential overflow before applying configuration changes?
Should GitLab introduce a built‑in check or warning when the sum of the three pools exceeds the configured postgresql['max_connections']?