fix: make connection pool size configurable via POOL_MAX_CONN env - #35
Merged
Conversation
Poller exhausts 50-connection pool during burst (264 planets + 44 campaigns). Allows poller to use larger pool (e.g. 100) without affecting API defaults. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Makes the database connection pool size configurable via
POOL_MAX_CONNenvironment variable. Fixes poller "connection pool exhausted" errors during collection cycles.Problem
The poller exhausts its 50-connection pool during burst workload (264 planets + 44 campaigns per cycle). Both API and poller shared the same hardcoded
maxconn=50.Solution
POOL_MAX_CONNfrom env indatabase.py; fall back to default 50POOL_MAX_CONN=100for its burst workloadDeploy
Poller deployment sets
POOL_MAX_CONN: "100". Requires API image v0.22+ (to be built after merge).