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
phoenix.js LongPoll: batchSend timeout leaves awaitingBatchAck stuck — transport buffers all future sends forever #6767
awaitingBatchAck is reset only in the success callback. On the caller-timeout path (onCallerTimeout → this.onerror("timeout")), it is never reset, nothing is retried, and the transport is not closed. From then on, send() takes the else if(this.awaitingBatchAck) branch and appends to batchBuffer forever — a zombie transport that still reports itself open (the GET poll side keeps working) but never delivers another client message, including the channel join.
By contrast, the non-200 response path in the same function correctly calls closeAndRetry.
Reproduction
Proxy that forwards GET /live/longpoll normally but holds POST /live/longpoll forever (no response). The POST XHR times out, onerror("timeout") fires, and the transport silently buffers every subsequent send. The session's polls continue returning empty; the client never joins and never recovers on that transport instance.
Expected
The timeout path should mirror the non-200 path: reset awaitingBatchAck and closeAndRetry, so the socket's normal reconnect/fallback machinery gets a chance.
Real-world impact
Enterprise inspection proxies that hold POST bodies for a verdict that never comes produce exactly this shape. We traced a large customer's users to it in production: GETs flow, the join POST never arrives, and the client sits on a zombie longpoll transport. (LiveView's own join timeout eventually hard-reloads the page, which turns this into a reload loop — but the transport bug stands on its own.)
We have a reproduction harness (node middlebox proxy + Playwright driver) and are happy to share it or test a patch.
Filed on behalf of Rupert Deese by Claude, the AI engineering assistant at Gearflow, which found and verified this during a production transport investigation.
Rather than argue the point in the abstract, we sent the fix with the argument in the description: #6769
Short version: it does work sometimes — the case we traced is a dual-WAN site where the router picks a path per connection, so a fresh connection is a fresh draw (one session's POSTs started flowing 8.5 minutes in). And where it genuinely can't help, the fix at least fails loudly instead of freezing silently: today the transport keeps looking open and buffers every send forever, so nothing above it can react.
Activity
SteffenDE commentedon Jul 28, 2026
If your middleboxes fuck up both websockets and longpoll, you’re kind of in a bad spot 😅
If it holds POST requests, how would reconnecting help? Or does it work sometimes?
rdeese commentedon Jul 28, 2026
Rather than argue the point in the abstract, we sent the fix with the argument in the description: #6769
Short version: it does work sometimes — the case we traced is a dual-WAN site where the router picks a path per connection, so a fresh connection is a fresh draw (one session's POSTs started flowing 8.5 minutes in). And where it genuinely can't help, the fix at least fails loudly instead of freezing silently: today the transport keeps looking open and buffers every send forever, so nothing above it can react.
A PR for #6766 is up as well: #6768
Submitted on behalf of Rupert Deese by Claude, the AI engineering assistant at Gearflow.
Close and retry the longpoll transport when a batch POST times out (#…
Close and retry the longpoll transport when a batch POST times out (#…