abundant-father-33863
02/17/2026, 12:18 PMtall-airline-16756
02/17/2026, 12:18 PMtall-airline-16756
02/17/2026, 12:18 PMDeleteRoom API. If deletes are failing, it’s usually due to an incorrect room name, credentials/permissions, or connectivity issues — or you may need to check server logs for errors.
What you can try now
1. Delete a room directly
◦ Call the RoomService DeleteRoom operation (or delete_room(room_name) in the SDK) with the exact room name. This forces the room to close and disconnects any participants.
◦ Example (Python):
await client.room.delete_room(api.DeleteRoomRequest(room="stale-room-name"))
• Example (Node.js):
await roomService.deleteRoom("stale-room-name");
1. Verify the basics if deletion fails
◦ Confirm the exact room name you’re passing matches the server’s room name (case-sensitive).
◦ Ensure the API key/secret used by your SDK has room-management permissions.
◦ Make sure your SDK can reach the LiveKit server (network, ports, TLS/gRPC endpoint).
1. Inspect server logs
◦ When a delete fails, check the LiveKit server logs for errors (authentication failures, RPC errors, or internal exceptions). Logs typically reveal why the deletion didn’t succeed.
1. Why you see rooms with 0 participants
◦ Rooms can briefly persist after the last participant leaves due to a departure timeout and sweeper cleanup delay. That doesn’t prevent manual deletion, though persistent stuck rooms usually point to an error or race condition.
1. Automate cleanup (recommended for self-hosted)
◦ Periodically list rooms, filter for num_participants == 0 and older creation times, then call DeleteRoom for those names. This watchdog script prevents buildup of stale rooms.
Questions to narrow this down
• When you call delete, do you get an error message or does the call succeed but the room remains? If there’s an error text, please paste it.
• Are you using a server SDK (which language) or calling the API directly? That helps me give exact code/snippet to try.
• Are you running a specific LiveKit version or a custom build? If you don’t know, tell me how you deployed (docker/helm/binary) and I’ll advise how to find the version.
If you share the error you see or which SDK/command you’re using to delete, I’ll give precise troubleshooting steps and sample commands.
Sources: Job lifecycle | LiveKit Documentation | Ensuring Unique Room IDs with Dynamic Room Names | LiveKit | server-sdk-js | livekit/livekit_composite | DeepWiki | Server-side | livekit/livekit_composite | DeepWikiabundant-father-33863
02/17/2026, 12:22 PMtall-airline-16756
02/17/2026, 12:22 PMDeleteRoom may not actually exist in the server’s active room store.
• Room names are case-sensitive or slightly different than you expect.
• There may be timing/race conditions (room is already being cleaned up by the server).
• If you’re reacting to a webhook like room_finished, that webhook fires after the room is already removed.
• Self-hosting specifics (DB/Redis propagation or version mismatches) can lead to inconsistent visibility.
Please share these 5 items so I can pinpoint the problem
1. The exact room name you attempted to delete (copy/paste).
2. The output of your list_rooms() call (or a screenshot/text of the active room list).
3. The exact error text and stack trace (you already shared the Twirp error — any surrounding logs help).
4. Which SDK/language and the delete call you used (paste the code snippet).
5. How you deployed LiveKit (self-hosted via Docker, Helm, binary) and the LiveKit server version.
Immediate checks you can run now
1. Confirm the room appears in the server’s active list:
◦ Call list_rooms() and check for the exact name you plan to delete.
1. Use the exact name returned by list_rooms() when calling delete_room() (room names are case-sensitive).
2. If list_rooms() does not show the room but the UI does, check server logs for messages like Room finished or Room removed from room store to confirm it was already cleaned up.
3. If you’re triggering delete from a webhook (e.g., room_finished), don’t call delete_room() there — the room is already gone.
4. Verify your API credentials and endpoint are pointing at the same server instance you’re inspecting (a common cause of “it exists in UI but not via API”).
If delete returns “does not exist” but the room is visible in your UI
• Confirm the UI and the API are hitting the same LiveKit instance/cluster and same database/Redis. Different replicas or stale caches can show different states.
• Check for a race where the room is being auto-removed (empty timeout, sweeper) at the same time you try to delete.
If you prefer, paste the outputs/code here (list_rooms result and the delete call you are running). With those I’ll:
• Verify the exact name/ID you should pass to delete_room()
• Suggest a precise delete command/snippet
• Point out any server log lines to look for if deletion still fails. Sources: Ensuring Unique Room IDs with Dynamic Room Names | LiveKitabundant-father-33863
02/17/2026, 12:31 PMtall-airline-16756
02/17/2026, 12:32 PMlist_rooms, and you’re wondering if restarting the LiveKit service will fix the “room does not exist” issue. I’ll walk through what helps and what to try next.
Short answer
• DeleteRoom requires the room name (not a SID). If you used the exact room name returned by list_rooms() and the API still says “requested room does not exist,” a restart usually is not the first fix and often won’t resolve the underlying cause.
• The right next steps are to confirm the API and UI are pointing at the same instance/cluster, inspect server logs around the time you attempt deletion, and verify there are no propagation or version mismatches.
What to check now (quick steps)
1. Confirm you’re using the exact room name returned by list_rooms() (copy/paste). Room names are case-sensitive.
2. Ensure the API endpoint/credentials you’re calling target the same LiveKit instance that shows the room in your UI.
3. Run list_rooms() immediately before delete_room() and pass the name directly from that result to delete_room() to avoid any naming mismatch:
◦ If list_rooms() does not include the room, the server already considers it gone.
1. Check server logs when you attempt delete:
◦ Look for messages like Room finished, Room removed from room store, or any errors indicating DB/Redis connectivity or Twirp issues.
1. Verify LiveKit server version vs SDK version — mismatches can cause Twirp/protobuf incompatibilities.
When a restart might help
• Restarting can help if the failure is caused by a transient internal error (e.g., stuck in-memory state, lost DB/Redis connection that hasn’t recovered).
• Restart is useful if logs show repeated internal errors, memory corruption, or unresolved connectivity to backing stores (Redis/Postgres).
• But restarting will not help if:
◦ The room is already deleted (so API correctly reports non-existence).
◦ You’re calling the wrong server/cluster or wrong credentials.
◦ There’s a race where the room is being auto-removed by the sweeper at the same time you call delete.
Recommended troubleshooting sequence
1. Run:
◦ list_rooms() and paste the output here (or copy the exact room name shown).
1. Attempt deletion immediately after listing and capture the full error/trace.
2. Check logs at the time of deletion on the LiveKit server and paste relevant lines (room-related or Twirp errors).
3. If logs show connectivity errors to Redis or DB, try restarting the LiveKit process and then retry the delete. If logs look clean but the API still says “does not exist,” the room truly isn’t in the active store anymore.
If you want, paste:
• The exact room name from list_rooms() (copy/paste),
• The delete call you run (code snippet),
• The LiveKit server logs around the delete attempt,
• How you deployed LiveKit (docker/helm/binary) and the server version.
I’ll review those and tell you whether a restart is likely to help or what targeted fix to apply next.abundant-father-33863
02/17/2026, 12:34 PMtall-airline-16756
02/17/2026, 12:34 PMlist_rooms() and copy the exact name returned.
◦ Attempt delete_room() using that exact name and paste any full error output.
1. Inspect server logs
◦ Look for lines mentioning sweeper, Room finished, Room removed from room store, or connectivity errors to Redis/Postgres.
◦ If logs show Redis errors or repeated Twirp RPC errors, that points to backing store problems.
1. Targeted fixes (preferred)
◦ If some rooms are stuck in Redis: consider removing only the offending keys rather than flushing entire DB. This is safer and preserves other state.
◦ If you can identify the room key(s) in Redis (based on room name/ID), delete those keys and then restart the LiveKit process that owns them.
◦ If a single LiveKit node is unhealthy in a cluster, restart that node rather than all nodes.
How to safely clear Redis (if you decide to)
• Warning: flushing Redis will remove other cached/coordination state. Only do this in a maintenance window.
1. Back up Redis (RDB/AOF) or snapshot before making changes.
2. If you use a dedicated Redis instance for LiveKit, connect and inspect keys (do NOT immediately run FLUSHALL):
◦ Use KEYS livekit:* or SCAN to find LiveKit-related keys.
1. Remove specific room keys when possible:
◦ DEL <key1> <key2> ...
1. If you must flush everything:
◦ FLUSHDB (flush current DB) or FLUSHALL (flush all DBs).
1. After cleanup, restart LiveKit processes so they reinitialize state.
If you’re on Kubernetes / Helm
• Restart a LiveKit pod:
◦ kubectl rollout restart deployment/<livekit-deployment>
• If using Redis as a StatefulSet, perform pod restart or scale operations carefully and ensure persistence is handled.
When a reset is recommended
• Logs show Redis or DB corruption/unreachable.
• Multiple nodes have inconsistent state and targeted deletes don’t fix it.
• You’re in a controlled maintenance window and can tolerate participant disconnects.
What I recommend now
• Don’t flush Redis yet. First:
a. Tell me your deployment (Docker/Helm/binary), LiveKit version, and whether you use Redis.
b. Paste list_rooms() output and the exact delete_room() error (full text).
c. Paste the relevant server log lines around the delete attempts (or tell me what you see).
• With that I’ll:
◦ Show the exact Redis keys to inspect/delete if appropriate, or
◦ Provide the minimal restart commands for your deployment, or
◦ Give a step‑by‑step safe Redis flush plan if flushing is your only option.
If you confirm you want the Redis flush instructions now, say so and I’ll provide the exact commands and safety checks for your environment.