Severity
Medium
Files
app/backend/src/main.ts, DatabaseModule (or equivalent)
Description
DB pool size, idle timeout, max lifetime, statement timeout are not exposed via env. Staging and production must run with the same defaults, causing cold-start failures under load.
Acceptance Criteria
- Wire DATABASE_POOL_MIN/MAX, IDLE_TIMEOUT_MS, STATEMENT_TIMEOUT_MS, MAX_LIFETIME_MS via ConfigService
- Document defaults in docs/ops-tuning.md
- Add a load-test assertion that pool saturation yields 503 (not 500)
Severity
Medium
Files
app/backend/src/main.ts, DatabaseModule (or equivalent)
Description
DB pool size, idle timeout, max lifetime, statement timeout are not exposed via env. Staging and production must run with the same defaults, causing cold-start failures under load.
Acceptance Criteria