important-minister-74457
07/12/2025, 12:29 PMtall-airline-16756
07/12/2025, 12:29 PMimportant-minister-74457
07/12/2025, 12:29 PMtall-airline-16756
07/12/2025, 12:30 PMasyncio.exceptions.CancelledError
and TimeoutError
you are encountering during LiveKit agent initialization are commonly caused by the supervised process failing to initialize within the configured timeout. This can stem from slow process startup, blocking or heavy operations during initialization, or resource limits being hit during startup.
• Increase the initialization timeout in your WorkerOptions
. For example:
opts = WorkerOptions(
initialize_process_timeout=30.0 # Increase from default 10.0
)
• Make sure the initialization function avoids heavy or blocking operations, as these can delay startup beyond the timeout period.
• Check memory usage and limits during initialization. If processes are being killed due to memory constraints, increase the relevant memory limits in WorkerOptions
.
• For troubleshooting, enable detailed logging for the livekit.agents
module.
Adjusting the timeout is the most common and effective resolution. Review your deployment and initialization routines as well to ensure they are as lightweight as possible.