Skip to content

fix: make connection pool size configurable via POOL_MAX_CONN env - #35

Merged
surrealwolf merged 1 commit into
mainfrom
fix/pool-max-conn-env
Feb 9, 2026
Merged

fix: make connection pool size configurable via POOL_MAX_CONN env#35
surrealwolf merged 1 commit into
mainfrom
fix/pool-max-conn-env

Conversation

@surrealwolf

Copy link
Copy Markdown
Collaborator

Summary

Makes the database connection pool size configurable via POOL_MAX_CONN environment 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

  • Read POOL_MAX_CONN from env in database.py; fall back to default 50
  • Poller can set POOL_MAX_CONN=100 for its burst workload
  • API keeps default 50 (appropriate for read traffic)

Deploy

Poller deployment sets POOL_MAX_CONN: "100". Requires API image v0.22+ (to be built after merge).

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>
@surrealwolf
surrealwolf merged commit 348b8ca into main Feb 9, 2026
9 checks passed
@surrealwolf
surrealwolf deleted the fix/pool-max-conn-env branch February 9, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant