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
{{ message }}
Repository navigation
Inflight Concurrency Cap Bypass on Streaming Bodies #1666
Currently in the JS SDK, the limitConcurrency wrapper around fetch releases the semaphore early (on headers) instead of when the response body is fully consumed. This defeats the connection accounting for streaming requests (e.g., logs, command execution) and can exhaust HTTP/2 streams (ERR_HTTP2_TOO_MANY_CONCURRENT_STREAMS). There is a clear TODO for this in js-sdk/src/api/inflight.ts.
affected_area: js-sdk / api inflight concurrency limiter
actionable: yes
needs_clarification: false
summary: limitConcurrency releases its semaphore on response headers rather than body completion, letting streaming requests bypass the inflight cap and exhaust HTTP/2 streams (matches the TODO in js-sdk/src/api/inflight.ts).
@ujjwalredd thanks for reporting this. It's fixed in e2b@2.56.0 (JS SDK) by #1733, which supersedes #1717. That PR removes the SDK-level in-flight cap (limitConcurrency in inflight.ts) entirely, so there's no slot accounting left to bypass. The SDK now depends only on undici@^8, which respects the server's HTTP/2 SETTINGS_MAX_CONCURRENT_STREAMS and opens more connections instead of hitting ERR_HTTP2_TOO_MANY_CONCURRENT_STREAMS.
Heads-up, this is a breaking change: the E2B_*_INFLIGHT_REQUESTS env vars are gone, and the SDK now requires Node.js >= 22.19.0.
Activity
mishushakov commentedon Aug 19, 2026
/sdk draft
devin-ai-integration commentedon Aug 19, 2026
Triage
limitConcurrencyreleases its semaphore on response headers rather than body completion, letting streaming requests bypass the inflight cap and exhaust HTTP/2 streams (matches the TODO in js-sdk/src/api/inflight.ts).Written by Devin
devin-ai-integration commentedon Oct 13, 2026
@ujjwalredd thanks for reporting this. It's fixed in
e2b@2.56.0(JS SDK) by #1733, which supersedes #1717. That PR removes the SDK-level in-flight cap (limitConcurrencyininflight.ts) entirely, so there's no slot accounting left to bypass. The SDK now depends only onundici@^8, which respects the server's HTTP/2SETTINGS_MAX_CONCURRENT_STREAMSand opens more connections instead of hittingERR_HTTP2_TOO_MANY_CONCURRENT_STREAMS.Heads-up, this is a breaking change: the
E2B_*_INFLIGHT_REQUESTSenv vars are gone, and the SDK now requires Node.js >= 22.19.0.Upgrade:
npm i e2b@2.56.0Written by Devin