Skip to content

Tighten Mux SRT pacing lead and log ACK counters#1091

Merged
fusion2004 merged 1 commit into
mainfrom
fix-mux-dropped-packets
May 21, 2026
Merged

Tighten Mux SRT pacing lead and log ACK counters#1091
fusion2004 merged 1 commit into
mainfrom
fix-mux-dropped-packets

Conversation

@fusion2004
Copy link
Copy Markdown
Owner

Summary

  • Drop PACING_LEAD_MS from 900 → 250. The previous fix in Fix Mux SRT streaming and reconnect bugs #1090 still left only 120ms of headroom against libsrt's ~1020ms TLPKTDROP threshold; production traces show ACKs from Mux arriving ~800ms late, so routine jitter pushes packets past the threshold and ~50% get TLPKTDROP'd. Mux then drops the connection after ~26s of gappy audio.
  • Add byteSent, pktRecvACK, and pktSentACK to the SRT stats log so the next production trace can confirm or rule out the slow-ACK theory directly instead of inferring it from msSndBuf.

Test plan

  • mise run lint passes locally (✓)
  • Start a Mux-backed party in production and watch [mux/srt] stats entries: msSndBuf should sit comfortably below 500ms instead of ~800ms, and pktSndDrop should be near 0
  • Confirm pktRecvACK is non-zero (we are receiving ACKs); if it's still ~0, the diagnosis was wrong and we need to investigate the receive path next
  • Stream survives at least one full song without "Connection was broken" reconnects

🤖 Generated with Claude Code

Production traces with last party's 900ms PACING_LEAD_MS still showed ~50%
of packets TLPKTDROP'd and Mux dropping the connection after ~26s. Send
buffer hovers at ~800ms (close to libsrt's ~1020ms drop threshold), so any
ACK-arrival jitter pushes packets over the edge. Drop the lead to 250ms
to keep the buffer aged well under the threshold even when ACKs are slow.

Also log byteSent, pktRecvACK, and pktSentACK from srt_bstats so the next
trace can confirm or rule out the slow-ACK theory directly instead of
inferring it from msSndBuf.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@railway-app railway-app Bot temporarily deployed to main / production May 21, 2026 20:13 Inactive
@fusion2004 fusion2004 merged commit 22170df into main May 21, 2026
7 checks passed
@fusion2004 fusion2004 deleted the fix-mux-dropped-packets branch May 21, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant