Hi, We have a self-hosted LiveKit instance running...
# ask-ai
h
Hi, We have a self-hosted LiveKit instance running on Docker in a VM with 4 CPU and 8GB RAM, and we're experiencing a critical intermittent issue where web call initialization sometimes works and sometimes fails to start at all, with no consistent pattern. The same setup works perfectly fine every time with LiveKit Cloud, but our self-hosted instance is unreliable and we cannot identify the root cause. This is affecting our production environment urgently. Could you please help us diagnose why the self-hosted instance behaves inconsistently and what configuration or resource changes we need to make it as reliable as the cloud version?
t
Thanks for reaching out, Sahil. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd love to help you get this sorted out! Could you please share a bit more about your self-hosted LiveKit setup? For example: • Do you see any error logs or messages when the call initialization doesn’t go through? • Which version of LiveKit are you currently using? • Have you added any custom configurations or plugins to your self-hosted instance? • Typically, how many users or calls are active when you notice this issue? With these details, we’ll be in a much better position to understand what’s going on and find the right solution together.
h
no i am unable to see any error logs. It just shows the logs while it starts successfully like job initialising, job initialized this type of logs are shown when it happens successfully when its failing i am unable to see any logs at all for version i see this livekit: image: livekit/livekit-server:latest command: --config /etc/livekit.yaml i am just importing and using livekit plugins its not even working for one user also the moment he starts a call and it may work then the second call doesnt initiaze
t
Let's work together to get to the bottom of this! Could you please try the following steps? 1. Enable debug logging by setting the environment variable
LIVEKIT_RTC_DEBUG=true
. This will give us more detailed logs, which can really help pinpoint what's going on. 2. Double-check that your LiveKit server token and configuration values are all valid. Sometimes even a small hiccup here can cause the server to misbehave. 3. If you can, try reproducing the issue on LiveKit Cloud. Comparing the behaviors there might help us see if the issue is specific to your self-hosted setup. Feel free to share what you find after enabling debug logs or trying these steps—I’m here to help you through this! Sources: livekit-rtc/livekit/rtc/_ffi_client.py | CHANGELOG.md | Still Have Questions
h
when i am using cloud its never causing this issue
t
It sounds like the issue is specific to your self-hosted setup since it doesn’t happen on LiveKit Cloud. This usually means it might be related to the configuration or environment of your self-hosted instance. Let’s try a few things together to get to the bottom of this: 1. Could you please enable debug logging by setting
LIVEKIT_RTC_DEBUG=true
? This will help capture detailed logs during call initialization and give us more clues. 2. Also, double-check that your LiveKit server token and configuration values are valid. Sometimes, the server won’t work properly if there’s an invalid configuration. 3. Once you’ve tried these steps, please let me know if enabling debug logs or verifying the configuration sheds any light on the issue. I’m here to help you through this!
h
where should i add the LIVEKIT_RTC_DEBUG=true in my agent or livekit server ?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!