flaky-jelly-17724
12/18/2025, 10:27 AMtall-airline-16756
12/18/2025, 10:27 AMtall-airline-16756
12/18/2025, 10:28 AMconnectOpts.rtcConfig = { iceTransportPolicy: 'relay' };
• Try from a different network (mobile hotspot) or disable VPN to see if the problem is network/firewall related.
Send the answers and any Connection Test results and I’ll recommend the next steps.
Sources: Connecting to LiveKit | LiveKit docs | Firewall Tips | Diagnosing Connection Errors with Connection Test Utilityflaky-jelly-17724
12/18/2025, 10:37 AMtall-airline-16756
12/18/2025, 10:37 AMconnectOpts.rtcConfig = { 'iceTransportPolicy': 'relay' };
1. Ensure TURN over TLS (port 443) is available and used
• Corporate firewalls frequently block/interrupt UDP; TURN/TLS on 443 is most firewall-friendly. Confirm your TURN server accepts allocations on TCP/TLS 443 and that your load balancer forwards 443 to it.
1. Check corporate NAT/firewall timeouts and UDP behavior
• Many corporate firewalls aggressively drop UDP NAT mappings. Ask your network team whether UDP session timeouts or connection tracking rules could be expiring around 30–40 minutes.
1. Use ICE/UDP multiplexing (single UDP port) if you need UDP
• Reduce port exposure and NAT churn by configuring a single UDP port for ICE traffic on the server (UDP mux).
1. Run the LiveKit Connection Test during a failure
• Run WebSocket, WebRTC, and TURN checks (especially TURN). Share the results — they’ll show whether TURN allocations or WebRTC handshake are failing.
1. Enable debug logs on the LiveKit server and inspect failures
• Set log_level: debug and look for DTLS/ICE candidate pairing, TURN allocation errors, or repeated ICE restarts around the timeouts.
1. Check for corporate DPI / TLS inspection interference
• If the network performs TLS inspection (Zscaler-like), TURN/TLS or WebSocket traffic may be interrupted. Whitelist your LiveKit and TURN domains or disable protocol inspection for those domains.
1. Ensure client reconnection handling is enabled
• The SDK will reconnect automatically, but confirm your client logs show reconnect attempts and any error events (e.g., reconnecting, reconnected).
What I need next
• Results of the Connection Test (WebSocket, WebRTC, TURN) when the issue is happening.
• Relevant debug log snippets from the LiveKit server around the time of a failure (ICE/DTLS/TURN messages).
• Whether forcing iceTransportPolicy: 'relay' prevents the recurrent failures.
If you share those results/logs, I’ll help interpret them and recommend the precise server or network changes to stop the recurring timeouts.
Sources: Firewall Tips | Deploying LiveKit | LiveKit docs | Ports and firewall | LiveKit docs | Deploy to a VM | LiveKit docs | Configuring firewalls | LiveKit docs