Bun.SQL sql.begin() and sql.reserve() Rotate Through All Pooled Connections
Is it fixed? Not yet.
Ongoing since Nov 18, 18:07 UTC. First reported Nov 18, 18:07 UTC.
What happened
Under steady transaction traffic, Bun.SQL's sql.begin() and sql.reserve() methods rotate through every pooled connection instead of reusing them. As a result, the idleTimeout configuration never shrinks the connection pool under steady sequential transaction traffic.
What caused it?
Under active investigation. No report has identified a root cause yet.
No verified workaround yet
None of the linked reports describe a mitigation. This page updates when one appears.
Timeline
- Investigating(current)
- Workaround available(upcoming)
- Resolved(upcoming)
- First report on GitHub issue
Bun.SQL: `sql.begin()` / `sql.reserve()` rotate through every pooled connection, so `idleTimeout` never shrinks the pool under steady transaction traffic
Source
Evidence
1 report · 1 GitHubShow
- [1]GitHub First reportBun.SQL: `sql.begin()` / `sql.reserve()` rotate through every pooled connection, so `idleTimeout` never shrinks the pool under steady transaction traffic(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.4+38afee6c8 and 1.4.5-canary.1+4ce14ba8b (same result on 1.3.0+b0a6feca5) What platform is your computer? Linux aarch64 (PostgreSQL 12.22 in Docker on the same machine) What steps can reproduce the bug? A pool with max: 10 and idleTimeout: 5 gets one operation every 200 ms, strictly one at a time, so a single connection is always enough. The script runs the same pacing three times: plain queries, sql.begin(), and sql.reserve(), and prints how many sessions…
by AbhishekCityMall 0upvotes 1comments
FAQ
What happened in the Bun issue?
Under steady transaction traffic, Bun.SQL's sql.begin() and sql.reserve() methods rotate through every pooled connection instead of reusing them. As a result, the idleTimeout configuration never shrinks the connection pool under steady sequential transaction traffic.
What is affected by the Bun issue?
Bun (versions: 1.4.4+38afee6c8, 1.4.5-canary.1+4ce14ba8b, 1.3.0+b0a6feca5).
When did the Bun issue start and end?
It started Nov 18, 18:07 UTC and is still ongoing (10 h 36 min so far). This page updates as it develops.
How do I get alerts for Bun?
Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed
Where does this information come from?
WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.