Skip to content

fix: connection pool exhausted in poller - #34

Merged
surrealwolf merged 1 commit into
mainfrom
fix/connection-pool-exhausted
Feb 9, 2026
Merged

fix: connection pool exhausted in poller#34
surrealwolf merged 1 commit into
mainfrom
fix/connection-pool-exhausted

Conversation

@surrealwolf

Copy link
Copy Markdown
Collaborator

Summary

Fixes poller failing with "connection pool exhausted" during data collection cycles.

Root cause

The poller runs 264+ planet saves and 44 campaign saves per cycle. With a pool of 10 connections, the pool was exhausted before connections were returned, causing:

  • Failed to save planet status: connection pool exhausted
  • Failed to save campaign: connection pool exhausted
  • Failed to update system status: connection pool exhausted

Since set_upstream_status(True) never ran, the site showed DEGRADED.

Changes

  1. Increase pool size: maxconn 10 → 50 for poller workload
  2. Reset connection state: Add conn.rollback() before putconn() to ensure connections are clean for reuse

Poller exhausts pool with 264+ planet saves and 44 campaign saves per cycle.
- Increase maxconn 10 -> 50 for poller workload
- Add conn.rollback() before putconn to reset connection state for reuse

Co-authored-by: Cursor <cursoragent@cursor.com>
@surrealwolf
surrealwolf merged commit 69d01f8 into main Feb 9, 2026
9 checks passed
@surrealwolf
surrealwolf deleted the fix/connection-pool-exhausted branch February 9, 2026 05:56
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