little-king-41579
05/08/2026, 6:30 AMtall-airline-16756
05/08/2026, 6:30 AMtall-airline-16756
05/08/2026, 6:30 AMshutdown_process_timeout in agent server options to a smaller value.
• Optimize your callback work: make I/O/database calls faster, batch writes, or reduce synchronous work.
• Offload non‑critical work to an async background job or queue so the shutdown path only does essential cleanup.
Quick checklist to follow:
1. Confirm your current shutdown_process_timeout and lower it if appropriate.
2. Profile the callback to find slow operations (DB, HTTP calls, file I/O).
3. Move long-running tasks to a background worker or retryable job queue.
4. Ensure you’re not unintentionally blocking on retries or heavy synchronous processing during shutdown.
5. If observability uploads run at shutdown, make them async or perform them outside the critical shutdown path.
If you want, tell me:
• which agent/SDK you’re using and where your callbacks perform I/O (DB, HTTP, files), and I’ll suggest concrete optimization or code patterns. Sources: Job lifecycle | LiveKit Documentation | Why is my Agent insights data missing? | LiveKit | Deployment reliability on LiveKit Cloud | LiveKit, with interactive elements