P
P
Pavel Kilin2017-08-25 12:44:18
Docker
Pavel Kilin, 2017-08-25 12:44:18

How to gracefully restart a long-lived process?

Hello. I have a container in which a long-lived application (a game bot) runs. In no case should this application be killed in the middle of work (because data on the state of the game and the connection to the game server are lost). Periodically, I roll out new versions of this application and at these moments it needs to be restarted, waiting for the completion of the current work. Those. it is not necessary to restart at the same second, you can wait several minutes or even hours. Could not be
used because docker-compose stop game-botafter SIGTERMthat, after 10 seconds (it seems to be configurable, but I could not wait more than 10 minutes) it sends SIGKILLand the container stops hard. Besides, I don't know exactly how long the game will last.
Is there any alternative solution? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question