#4726·livekit

CreateRoom returns a still-draining room (same SID) when a room is re-created shortly after deletion, then evicts the new participants

Author: matias-sandaczCreated Aug 4, 2026Updated Aug 25, 2026

Describe the bug When a room is deleted and then re-created under the same name within a short window (1-30seconds), CreateRoom returns the old room instance that is still finishing its async teardown. It uses the same SID as the one being deleted. New participants join that SID successfully, but seconds later the teardown completes and everyone is kicked with ROOM_CLOSED. From the client's side the join looks fine and then silently dies.

Server Livekit Cloud

Client js - livekit-client - 2.19.0 - Used by our Frontend app when a participant joins a room. go - github.com/livekit/server-sdk-go - v1.0.16 SDK used by our Backend app to call CreateRoom/DeleteRoom.

To Reproduce Steps to reproduce the behavior:

  1. Create room by calling CreateRoom("my-room"), participants join.
  2. Call DeleteRoom to end the session. Connected clients disconnect with Disconnected(ROOM_DELETED=5).
  3. Within ~2–3s, call CreateRoom("my-room") again and have a participant join.
  4. CreateRoom returns a room with the same SID as the one from step 2. The participant joins it.
  5. ~10s later the original teardown finalizes and the participant is disconnected with ROOM_CLOSED. Retries against that SID return JOIN_FAILURE.

Note this is timing-sensitive and won't reproduce if the delete→recreate gap is too large. It needs the recreate to land inside the SID-reservation window (~10s for us). A purely local setup with no teardown latency may not hit it; it's much easier to trigger against a real/Cloud deployment where teardown is async.

Expected behavior Re-creating a room with a name whose previous instance is still being deleted should return a genuinely new room with a new SID.

Screenshots n/a

Additional context

Observed timeline from our webhook logs (one occurrence, times UTC):

19:27:38 room_finished SID RM_pJNQTv4CkV4U (room deleted) 19:27:40 participant_joined SID RM_pJNQTv4CkV4U (user joins — 2s after finish, same SID) 19:27:50 participant_left SID RM_pJNQTv4CkV4U disconnect_reason=ROOM_CLOSED (~10s later) 19:28:18 participant_connection_aborted SID RM_pJNQTv4CkV4U disconnect_reason=JOIN_FAILURE (retries against dead SID)

This looks like the same root cause as https://github.com/livekit/livekit/issues/4558. We see the same behavior on server-sdk-go v1.0.16, so it doesn't appear to be SDK or language-specific.

We use LiveKit to stream real-time video from vehicle dashcams to our fleet management app at Nauto. This is a customer-facing production feature rolling out across many of our fleets, and this race is causing streams to drop on reconnect for real users, so getting it resolved is a priority for us. Happy to provide more logs or help repro.