I am experiencing an unexpected issue with my self-hosted LiveKit server. I am using a Flutter app for the frontend and a Laravel backend for room management and token generation.
To be honest, I don't know exactly which code is causing the problem, which is why I can't provide a minimal reproducible example (MRE). It seems to be a strange production environment issue rather than a simple code bug.
The Issue:
My app ran perfectly in production for 4 months without any issues. However, for the past 2 days, any newly created room only stays active for about 2-3 minutes. After this short time, all participants are forcefully removed/disconnected, and the room automatically closes.
What I have tried & Log observations:
I completely wiped my VPS, re-uploaded my backend code, and did a fresh installation of the LiveKit server.
After the fresh install, everything worked perfectly for about 10-12 hours. But after that period, the exact same issue returned.
I investigated the LiveKit logs and found that API requests for 'remove participant' and 'close room' are being triggered from my backend.
The confusing part: My Laravel backend has absolutely NO logic or endpoints written by me that trigger these specific API calls to remove participants or close rooms.
Expected behavior:
The room should remain active as long as there are connected participants or until it is explicitly closed via the backend API. Participants should not be randomly disconnected after a few minutes.
Steps to reproduce:
Create a room via the Laravel backend.
Join the room using the Flutter livekit_client SDK.
Wait for 2-3 minutes.
Observe that all participants are suddenly disconnected and the room is closed on the server.
Since the logs show these calls coming from my backend, but my codebase doesn't initiate them, how can I trace what is making these phantom calls? Could this be related to a token expiration, a background worker, or a compromised server issue? Any guidance on debugging this would be highly appreciated.
Top comments (0)