In dev mode, viteDevServer.ssrLoadModule re-evaluates server/app.ts on every request, creating a new postgres connection pool each time and eventually exhausting Postgres's max_connections limit. Cache the client on globalThis so HMR re-evaluations reuse the same pool. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| app.ts | ||
| snapshots.ts | ||
| socket.d.ts | ||
| socket.ts | ||
| timer.ts | ||
| types.d.ts | ||
| virtual-modules.d.ts | ||