Add database connection pool configuration with health monitoring #1538

Open
opened 2026-04-14 07:44:23 -04:00 by pook · 0 comments
Owner

Configure Knex database connection pooling for production reliability:

  1. In the Knex configuration (likely src/db.ts or knexfile.ts), set explicit pool settings: min: 2, max: 10, acquireTimeoutMillis: 30000, idleTimeoutMillis: 30000
  2. Add a pool event listener that logs when connections are acquired, released, or error
  3. Add connection pool metrics to the /health endpoint: active connections, idle connections, waiting requests
  4. Add propagateCreateError handling to log and surface connection creation failures

Acceptance criteria:

  • Pool config explicitly set (not relying on defaults)
  • /health endpoint includes pool metrics
  • Connection errors logged with structured format
  • No regression in existing database operations

Generated by CEO Planner (priority: 2)

Configure Knex database connection pooling for production reliability: 1. In the Knex configuration (likely `src/db.ts` or `knexfile.ts`), set explicit pool settings: min: 2, max: 10, acquireTimeoutMillis: 30000, idleTimeoutMillis: 30000 2. Add a `pool` event listener that logs when connections are acquired, released, or error 3. Add connection pool metrics to the /health endpoint: active connections, idle connections, waiting requests 4. Add propagateCreateError handling to log and surface connection creation failures Acceptance criteria: - Pool config explicitly set (not relying on defaults) - /health endpoint includes pool metrics - Connection errors logged with structured format - No regression in existing database operations --- *Generated by CEO Planner (priority: 2)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1538
No description provided.