millions-wire-93176
12/10/2025, 5:15 AMtall-airline-16756
12/10/2025, 5:15 AMtall-airline-16756
12/10/2025, 5:15 AMmillions-wire-93176
12/10/2025, 5:32 AMtall-airline-16756
12/10/2025, 5:33 AMmillions-wire-93176
12/10/2025, 5:37 AMRM_4aGH3W3h8FZV
How TTS sessions are started:
• SDK: LiveKit Python Agents SDK (livekit-agents version 1.3.6)
• Agent process: Running locally via uv run python src/agent.py dev
• Environment: macOS (not containerized, running directly)
• TTS Configuration: Using inference.TTS(model="cartesia/sonic-3") through LiveKit Inference Gateway
• Agent settings:
◦ preemptive_generation=True (recently changed to False)
◦ use_tts_aligned_transcript=Truemillions-wire-93176
12/10/2025, 5:38 AMRM_4aGH3W3h8FZV
• Room Name: room-m5rKC
• Job ID: AJ_MmM2vD5rQURx
429 Error logs:
WSServerHandshakeError: 429, message='Invalid response status',
url='wss://agent-gateway.livekit.cloud/v1/stt'
WSServerHandshakeError: 429, message='Invalid response status',
url='wss://agent-gateway.livekit.cloud/v1/tts'
Previous attempts with same errors:
• 22:53 PM EST (Dec 9)
• 22:07 PM EST (Dec 9)
• 21:56 PM EST (Dec 9)
Additional context:
• Dashboard shows concurrent TTS limit: 5, peak usage: 7
• All local processes have been killed (pkill -f "python src/agent.py")
• No deployed instances running
• 429 errors persist for 2+ hours despite clean restartstall-airline-16756
12/10/2025, 5:38 AMp_7h1o56ko25a / room RM_4aGH3W3h8FZV.
Quick facts: the concurrent TTS limit is lifted automatically when active TTS connections fall below the limit (5). There’s no fixed cooldown — new requests succeed immediately once slots are free.
Next diagnostic steps to find what's still holding slots open:
1. Confirm active participants in the room
• Do you see any participants in room-m5rKC on the dashboard right now? If you can, list participant IDs you see.
1. Check for orphaned WebSocket connections locally
• Run: ps or lsof to ensure no leftover python or websocket processes hold sockets (e.g., lsof -iTCP -sTCP:ESTABLISHED | grep python).
• On macOS, also check netstat -anv | grep ESTABLISHED for any lingering agent connections.
1. Verify agent shutdown path is closing TTS sessions
• Ensure your agent code calls the SDK disconnect/stop routines that close TTS streams when you terminate (confirm the shutdown handler runs).
• Since you used pkill -f, that can leave sockets open until OS cleans them; try a full machine restart if possible to ensure everything is closed.
1. Confirm no other machines/CI are creating sessions
• Double-check CI jobs, other developer machines, or test scripts that might have started agents earlier.
1. Gather evidence if slots still show used
• From the agent logs, share any participant connect/disconnect entries around your restart at Dec 10 00:22 AM EST and the Job ID AJ_MmM2vD5rQURx.
• From the dashboard, a screenshot or exact participant list and timestamps of peak 7 concurrent TTS would help.
Tell me which checks you’ve already run (dashboard participant list, lsof/netstat results, and whether you can reboot the machine). If after those checks the slots still appear occupied, share the participant IDs or the relevant log snippets and I’ll help pinpoint the remaining active sessions.millions-wire-93176
12/10/2025, 5:49 AMRM_TKo9xP5mdzrU. The concurrent TTS connections appear stuck on your gateway - can you manually reset them?”tall-airline-16756
12/10/2025, 5:50 AMmillions-wire-93176
12/10/2025, 3:33 PM