{"level": "INFO", "name": "livekit.agents", "messa...
# ask-ai
b
{"level": "INFO", "name": "livekit.agents", "message": "TTS metrics", "model_name": "gpt-4o-mini-tts", "model_provider": "lms-ai-dev.services.ai.azure.com", "ttfb": 0.8930443749995902, "audio_duration": 3.8, "pid": 42, "job_id": "AJ_yLmG7AvZUn9g", "room_id": "RM_AUJTBkjoBuux", "timestamp": "2025-12-11T125557.914335+00:00"} 2025-12-11 155614 {"level": "WARNING", "name": "livekit", "message": "livekit:rtc engine470livekit:rtc_engine - received session close: \"server request to leave\" ConnectionTimeout Resume", "pid": 42, "job_id": "AJ_yLmG7AvZUn9g", "room_id": "RM_AUJTBkjoBuux", "timestamp": "2025-12-11T125614.847491+00:00"} 2025-12-11 155614 {"level": "WARNING", "name": "livekit", "message": "livekit:rtc engine470livekit:rtc_engine - received session close: \"signal client closed: \\\"stream closed\\\"\" UnknownReason Resume", "pid": 42, "job_id": "AJ_yLmG7AvZUn9g", "room_id": "RM_AUJTBkjoBuux", "timestamp": "2025-12-11T125614.847573+00:00"} 2025-12-11 155614 {"level": "ERROR", "name": "livekit", "message": "livekit:rtc engine766livekit:rtc_engine - resuming connection... attempt: 0", "pid": 42, "job_id": "AJ_yLmG7AvZUn9g", "room_id": "RM_AUJTBkjoBuux", "timestamp": "2025-12-11T125614.847630+00:00"} 2025-12-11 155614 {"level": "WARNING", "name": "livekit", "message": "livekit:rtc enginertc session866livekitrtc engine:rtc_session - Wrong packet sequence while retrying: 281 > 276, 5 packets missing", "pid": 42, "job_id": "AJ_yLmG7AvZUn9g", "room_id": "RM_AUJTBkjoBuux", "timestamp": "2025-12-11T125614.955429+00:00"} what this can be?
t
Thanks for reaching out, Aleh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're seeing a connection interruption and a failed resume attempt. Quick breakdown of each log line and what to check: • "TTS metrics" — informational: the agent produced TTS just before the issue (no action needed). • "received session close: 'server request to leave' ConnectionTimeout Resume" — the server terminated the session because a resume attempt timed out. Check reconnection timing and network reliability between client and server. • "received session close: 'signal client closed: \"stream closed\"'" — the signaling (WebSocket) stream was closed. Common causes: unstable network, client process exit, or a proxy/TLS termination closing long-lived connections. • "resuming connection... attempt: 0" — client started automatic reconnection; this was the first retry. • "Wrong packet sequence while retrying: 281 > 276, 5 packets missing" — RTP packet sequence jumped, indicating packet loss or out-of-order delivery during the resume. This is a symptom of transport instability or media-path desync. Most likely root causes • Network instability or packet loss between client and SFU • Signaling/WebSocket interruption (firewall, proxy, TLS inspection, or client crash) • Resume window expired or resume attempted against a different media node Recommended next steps 1. Check network quality (packet loss, jitter, RTT) for the client and agent around the timestamp. 2. Test without corporate proxies / TLS inspection (Zscaler-like middleboxes can close WebSockets). 3. Use the LiveKit Connection Tester or webrtc-internals to inspect packet loss, NACKs, RTT, and ICE/TURN behavior. 4. Confirm the client handled Reconnecting events and retried quickly enough to meet resume timing. 5. If this is an agent process (job_id shown), verify the agent wasn’t CPU-starved or killed. If you want, tell me: • whether this happened repeatedly or was a one-off, • whether the client was behind a corporate proxy/firewall, • and any webrtc-internals or Connection Tester results you have — and I’ll suggest targeted fixes. Sources: Connecting to LiveKit | LiveKit docs | Zscaler proxy configuration | Firewall Tips | Diagnosing Connection Errors with Connection Test Utility