ripe-arm-36009
12/10/2025, 9:33 AMtall-airline-16756
12/10/2025, 9:33 AMtall-airline-16756
12/10/2025, 9:34 AMDuplexClosed.
• The immediate low-level error is Windows OSError/ConnectionResetError: "[WinError 64] The specified network name is no longer available" while asyncio was performing socket/pipe I/O.
• There’s also a warning that an agent task took ~4.5s, suggesting a blocking operation on the event loop that may contribute to instability.
Actions you can try now (in order)
1. Force SelectorEventLoop on Windows (most likely fix)
• Add at the very top of your main script before any asyncio code runs:
import asyncio, sys
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
This avoids ProactorEventLoop/Proactor-related issues with multiprocessing + async pipes on Windows.
1. Move blocking work off the event loop
• If your entrypoint or inference startup does heavy sync work (model loads, large file I/O, blocking libs), wrap it in asyncio.to_thread() or perform it during a prewarm step:
await asyncio.to_thread(load_model, path)
1. Add early subprocess logging
• Log at the start of your inference subprocess proc_main() to capture crashes during model load. That helps determine if the subprocess itself is faulting.
1. Check environment & resources
• Ensure enough RAM/CPU for any models you load. Memory exhaustion can cause abrupt pipe closures.
• Temporarily disable firewall/antivirus to rule out interference with IPC or sockets.
1. Test connectivity and versions
• Confirm LiveKit server URL is reachable.
• Upgrade livekit-agents and related toolchain if you’re not on a recent release.
Targeted questions to narrow this down
1. Does this failure happen immediately on start, or after some runtime (minutes/hours)?
2. How are you launching the agent (script/CLI/Windows service)? Any special spawn options?
3. Which LiveKit Agents version are you running?
4. Do you load custom models/plugins in the inference_proc? If so, which and roughly how large (memory)?
5. Can you paste the minimal entrypoint function or the code that spawns/starts the inference_proc?
If you prefer, paste a short snippet of your agent startup (entrypoint + how you spawn the process) and I’ll point to the exact lines to change.
Sources: An open source stack for real-time multimodal AI | Firewall Tips | Job lifecycle | LiveKit docs | examples/survey | livekit/livekit_composite | DeepWiki | Events and error handling | LiveKit docs