Bun SQLite module: missing connection pool size configuration
0 reputation · 09 Aug 2021, 14:44 UTC
Developers using Bun's built‑in SQLite module need a way to cap the number of concurrent database connections to prevent intermittent connection pool exhaustion under high async query loads.
The module currently exposes no configuration option for a maximum pool size; it creates a shared connection per Database instance and may spawn additional temporary connections during concurrent queries, making the actual limit opaque and subject to OS file‑descriptor limits.
Is there a hidden flag or environment variable that can set the maximum concurrent connections for a Bun SQLite Database instance?
If not, what is the recommended pattern for manually limiting concurrency without exposing internal pool details?
Does Bun plan to expose a configurable pool size option in a future stable release?