mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-05 02:09:41 +01:00
Routes are built separately and each bundle that imports lib/db gets its own copy of the module. The handle lived in a module variable, so each copy opened its own pool of up to ten connections against a Postgres the box shares between products. The deploy of #299 was refused at its schema step with "too many clients already". The pool now lives on globalThis under a registered symbol (the same fix lib/auth/sender.ts needed), with its ceiling stated. Claude-Session: https://claude.ai/code/session_019MDtmsxWVjuhCQowciDEYR Co-authored-by: Claude <noreply@anthropic.com>