You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the same missing receive-side backpressure as #28035 — a fetch() response body consumed via getReader() that stops pulling lets the HTTP client keep reading from the socket, and every chunk is appended unbounded into ByteStream.buffer until allocation fails at ByteStream.onData.
Fix is in #29831, which pauses the socket (HTTP/1.1) / withholds flow-control credit (HTTP/2, HTTP/3) once the buffered bytes pass a high-water mark and resumes when the reader catches up.
Verified on main at df84f8d: a stalled fetch().body.getReader() now pauses the socket so ByteStream no longer buffers the entire response (the cause of the onData OOM panic); resume drains the full body.
# 256 MiB body, read one chunk then stall
main df84f8db1 : sent(stalled)=2.7 MiB rssΔ=11 MiB → full body received on resume
bun 1.3.13 : sent(stalled)=256.0 MiB rssΔ=685 MiB → unbounded buffering (OOM on larger bodies)
Activity
linear commentedon Sep 9, 2025
ENG-20354 Out of memory while copying request body
github-actions commentedon Sep 9, 2025
@Al-User12, thank you for reporting this crash. The latest version of Bun is v1.2.21, but this crash was reported on Bun v1.2.20.
Are you able to reproduce this crash on the latest version of Bun?
For Bun's internal tracking, this issue is BUN-VWQ.
fix(server): propagate backpressure from request body stream to HTTP …
robobun commentedon May 13, 2026
This is the same missing receive-side backpressure as #28035 — a
fetch()response body consumed viagetReader()that stops pulling lets the HTTP client keep reading from the socket, and every chunk is appended unbounded intoByteStream.bufferuntil allocation fails atByteStream.onData.Fix is in #29831, which pauses the socket (HTTP/1.1) / withholds flow-control credit (HTTP/2, HTTP/3) once the buffered bytes pass a high-water mark and resumes when the reader catches up.
robobun commentedon Jul 24, 2026
Fixed by #29831.
Verified on main at df84f8d: a stalled
fetch().body.getReader()now pauses the socket soByteStreamno longer buffers the entire response (the cause of theonDataOOM panic); resume drains the full body.