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
Abandoned pending tracks are never released, so long-lived participants permanently hit too many pending tracks #4970
Since v1.13.6 (#4750), a participant can have at most cMaxPendingTracks = 20 pending tracks. A pending track is created by AddTrack and is removed from pendingTracks in only two places:
If a client calls AddTrack and then abandons the publish before any media flows, nothing releases the entry. With the Go SDK, abandoning means LocalParticipant.UnpublishTrack, which only does pc.RemoveTrack(sender) and renegotiates. No signal reaches the server that it acts on for pending tracks. The entry stays reserved until the participant leaves the room.
For a participant that stays in the room for hours and occasionally publishes tracks that never produce media, these abandoned entries pile up. After 20, every later AddTrack is rejected with LIMIT_EXCEEDED, including tracks that would carry media, until the participant disconnects.
Server
Version: v1.13.6 (also reproduced against master at 5a897c2)
Environment: self-hosted, Kubernetes
Default rtc config (reconnect_on_publication_error not set)
Client
SDK: server-sdk-go
Version: v2.16.6
A long-lived server-side participant that bridges video from devices into the room and publishes and unpublishes tracks on demand as streams come and go.
To Reproduce
Join a room with server-sdk-go and keep the participant connected.
Repeat 20 times: PublishTrack with a new local track, write no samples, then UnpublishTrack.
Call PublishTrack again.
The server rejects it with too many pending tracks, rejecting new track, numPendingTracks: 20. On the SDK side, PublishTrack blocks for its 10-second publish timeout and then fails. This repeats for every later publish until the participant reconnects.
Expected behavior
An AddTrack whose publish was abandoned and never received media should release its pending slot at some point, so the cap stays a guard against runaway clients and doesn't become a lifetime budget for a session.
Add any other context about the problem here.
Hello hello, I was able to repro this "ticking timebomb" behavior for long-lived participants. When we publish and unpublish the track enough times, and hitting the 20 pending tracks cap, we will eventually no longer be able to publish any tracks.
It'd be great if we could get an upstream fix for this as soon as possible.
Have addressed this in #4998. Turned out to be trickier than I anticipated. Thank you for #4971 . Please let us know if the limit poses any issues for you.
Activity
rtc: release pending tracks that never receive media
kevin-pan-skydio commentedon Oct 12, 2026
@boks1971 maybe? 🙏 :ty:
kevin-pan-skydio commentedon Oct 12, 2026
Hello hello, I was able to repro this "ticking timebomb" behavior for long-lived participants. When we publish and unpublish the track enough times, and hitting the 20 pending tracks cap, we will eventually no longer be able to publish any tracks.
It'd be great if we could get an upstream fix for this as soon as possible.
rtc: release timed out pending tracks at the pending track limit (#4998)
boks1971 commentedon Oct 13, 2026
Have addressed this in #4998. Turned out to be trickier than I anticipated. Thank you for #4971 . Please let us know if the limit poses any issues for you.
kevin-pan-skydio commentedon Oct 16, 2026
@boks1971 thank you!