Skip to content

fix(proxy): raise inactive-session timeout 60s → 5m#692

Merged
jonathaneoliver merged 1 commit into
devfrom
fix/proxy-inactive-timeout-5m
Jun 8, 2026
Merged

fix(proxy): raise inactive-session timeout 60s → 5m#692
jonathaneoliver merged 1 commit into
devfrom
fix/proxy-inactive-timeout-5m

Conversation

@jonathaneoliver
Copy link
Copy Markdown
Owner

What

removeInactiveSessions synthesizes a terminal inactive_timeout for any session whose last request is older than the window, then frees its port. At 60s this evicted plays that were merely rebuffering.

Why

A characterization cycled sweep slams the cap from a 4K rung (~44 Mbps) straight back to the ~2 Mbps floor between cycles. AVPlayer, stranded mid-4K-segment, stalls ~50s+ draining and refilling the buffer — well under any real abandonment, but over the 60s window. The proxy killed the play, returned the app to Home, and every cycle after the first ran empty (observed in a 3-cycle 2s rampup: cyc1 climbed cleanly to 4K, then the cyc1→cyc2 floor slam stalled ~53s → playback_reason: inactive_timeout).

Change

Window 60s → 5m, pulled into a named const inactiveWindow so the value and rationale live together. 5m comfortably covers a legitimate downshift-rebuffer while still reaping genuinely-gone devices.

🤖 Generated with Claude Code

removeInactiveSessions synthesizes a terminal inactive_timeout for any
session whose last request is older than the window, then frees its
port. At 60s this evicted plays that were merely *rebuffering*: a
characterization cycled-sweep that slams the cap from a 4K rung back to
the ~2 Mbps floor between cycles strands AVPlayer mid-4K-segment and it
stalls ~50s+ draining/refilling — well under any real abandonment, but
over 60s, so the play was killed and later cycles ran empty.

5m comfortably covers a legitimate downshift-rebuffer while still
reaping genuinely-gone devices. Pulled into a named const so the intent
and value live in one place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Jun 8, 2026
@jonathaneoliver jonathaneoliver merged commit 5cbeb34 into dev Jun 8, 2026
1 check passed
@jonathaneoliver jonathaneoliver deleted the fix/proxy-inactive-timeout-5m branch June 8, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant