plain-hamburger-12701
10/05/2025, 2:24 PM⠦ Container ds-team-assist-livekit-1 Stopping 71.7s my live kit server docker compose take more than 60 seconds to stop when issuing a docker-compose down command, what is the right apporach to terminate the container sooner ? please provide a sample docker compose filetall-airline-16756
10/05/2025, 2:24 PMtall-airline-16756
10/05/2025, 2:25 PMdocker-compose down -t 10
This way, Docker won’t wait too long and will speed things up for you. 2. Force Immediate Termination: If you want to stop the container right away without waiting, try using:
docker-compose kill
This command bypasses the usual graceful shutdown and stops the container instantly. 3. Proactively End Rooms: Another helpful approach is to use the LiveKit Server API to delete any active rooms before shutting down the container. For example:
curl -X DELETE <LIVEKIT_SERVER_URL>/room/<room-name> \
-H "Authorization: Bearer <access-token>"
Just remember to replace <LIVEKIT_SERVER_URL> with your actual server’s base URL. This can really help speed up the shutdown process. 4. For Kubernetes Users: If you’re running LiveKit on Kubernetes, you might want to adjust the terminationGracePeriodSeconds in your pod specification to limit how long it waits during shutdown. One thing to keep in mind: LiveKit doesn’t currently offer a setting to change the shutdown timeout for the main server directly. The shutdown time depends on how long participants stay connected. For development, automating room cleanup before shutting down can make the process smoother and faster. I hope these suggestions help you get your LiveKit server shutting down just the way you want! If you have any more questions or need further assistance, feel free to ask. Sources: tests/Makefile | Job lifecycle | LiveKit Docs | CHANGELOG.md | Deploy to Kubernetes | LiveKit Docsplain-hamburger-12701
10/05/2025, 2:26 PMtall-airline-16756
10/05/2025, 2:26 PM