Four separate postgres() clients were open simultaneously (app, timer, snapshots, socket), each defaulting to 10 connections, exhausting the database's max_connections limit. Replaced with a single shared lazy- initialized client in server/db.ts using a Proxy to defer the DATABASE_URL check until first use (preserving test compatibility). Also bumps the CS2 Champions Stage stochastic test from 200 → 1000 iterations to eliminate flakiness. https://claude.ai/code/session_019w21Nkf5TvTZHH6oVHaQXR |
||
|---|---|---|
| .. | ||
| afl-simulator.test.ts | ||
| cs-major-simulator.test.ts | ||
| darts-simulator.test.ts | ||
| golf-simulator.test.ts | ||
| mlb-simulator.test.ts | ||
| ncaam-simulator.test.ts | ||
| ncaaw-simulator.test.ts | ||
| nhl-simulator.test.ts | ||
| snooker-simulator.test.ts | ||
| tennis-simulator.test.ts | ||
| ucl-simulator.test.ts | ||
| wnba-simulator.test.ts | ||
| world-cup-simulator.test.ts | ||