narrow-painter-37416
08/20/2025, 3:44 PMtall-airline-16756
08/20/2025, 3:44 PMtall-airline-16756
08/20/2025, 3:45 PMshutdown_process_timeout
of 300 seconds.
• Your shutdown callback is taking a bit longer than expected to finish up.
• There are extra timeout settings in your deployment environment affecting this.
Here’s how you can tackle this:
1. Speed Up Your Shutdown Callback: Try to keep it quick! Avoid heavy tasks like uploading big files or crunching lots of data during shutdown.
2. Adjust the Timeout: If you need more time, you can increase the timeout using the shutdown_process_timeout
parameter in WorkerOptions
. For example:
from livekit.agents import WorkerOptions
# Increase shutdown timeout to 10 minutes (600 seconds)
worker_options = WorkerOptions(
entrypoint_fnc=your_entrypoint,
shutdown_process_timeout=600
)
1. Double-Check Your Deployment Settings: Make sure your deployment platform’s grace period (like terminationGracePeriodSeconds
in Kubernetes) matches up well with your shutdown_process_timeout
setting.
For some extra help troubleshooting, try adding logging to your shutdown callback to see where the time’s going, confirm your WorkerOptions
setup, and take a look at your deployment configs for any other timeout rules.