best-thailand-14166
03/20/2026, 3:18 PMtall-airline-16756
03/20/2026, 3:18 PMtall-airline-16756
03/20/2026, 3:19 PMiceTransportPolicy: 'relay' so the client and backend use TURN over TCP/TLS and avoid UDP blocking issues.
1. Increase resilience and redundancy
◦ Run multiple agent workers for the same agent_name so a single slow/unresponsive worker won’t cause dispatch timeouts.
◦ Ensure the agent host isn’t running other heavy workloads that might cause scheduling delays.
1. Improve connection robustness
◦ Ensure the SDK reconnection and ICE restart behavior is enabled (the SDK performs reconnection/ICE restart/renegotiation in sequence).
◦ If possible, tune timeouts where jobs/dispatch occur (note: there is a 10-second connection timeout used for dispatch in some agent flows; if your environment commonly has higher latency, optimize the network path or increase allowable time where configurable).
1. Observe and measure
◦ Enable agent observability dashboards/log aggregation to correlate failures with network metrics, eou_delay/llm_ttft/tts_ttf (if relevant), and any ICE/DTLS failure events.
◦ Capture a failing session’s ICE logs (candidate pairs, selected candidate, state transitions) to see if candidate selection stalls or DTLS never completes.
If you run the checks above, please share:
• A brief snippet of the agent + client logs around one failure (ICE state changes and the timeout error).
• Whether you’re seeing any repeated ICE candidate failures or DTLS errors.
• Whether the environment uses restrictive corporate NAT/firewall or a public cloud with TURN available.
With those details I can help interpret the logs and recommend the next concrete steps (for example, TURN config changes, timeout tuning, or agent-side fixes).
Sources: client-sdk-js | livekit/livekit_composite | DeepWiki | Understanding the STATE_MISMATCH Disconnect Reason | Firewall Tips | Diagnosing Connection Errors with Connection Test Utility | Streamline troubleshooting with Agent Observability | LiveKit, with interactive elements