You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a container with a restart policy fails repeatedly, Docker imposes an exponentially increasing delay between restart attempts. This is, in general, useful, since it prevents a container which cannot start successfully from overloading the system. However, there is currently no way to limit how large this delay can grow.
The particular case I am dealing with is a container which depends on a particular system being in a ready state before it can start up, and exits if it is not. Given it is relatively cheap to start the container and check the state, I would like it to try no less than once every 10s. As-is, if the system is down, the restart delay can grow to an absurd length.
Things Which Will Not Work
'Use container dependencies'
The system which the container needs to wait on is not itself a container.
'Move the check-wait-recheck loop inside the container'
This results in the container being 'up' when it is not, in fact, in operation condition
'Docker swarm has this option called 'restart_policy'...'
I am not using Swarm. This functionality should be in base docker.
Other Things Which Would Be Nice To Be Able To Adjust
The minimum delay at which the exponential backoff starts
The amount of time the container must be up in order to count as 'successful' and reset the backoff timer
Whether a run of the container which lasts longer than the required time but exits with a nonzero code should count as 'successful' at all (or conversely, whether a run which doesn't last that long but exits with code 0 should count as 'successful' automatically)
The text was updated successfully, but these errors were encountered:
When a container with a restart policy fails repeatedly, Docker imposes an exponentially increasing delay between restart attempts. This is, in general, useful, since it prevents a container which cannot start successfully from overloading the system. However, there is currently no way to limit how large this delay can grow.
The particular case I am dealing with is a container which depends on a particular system being in a ready state before it can start up, and exits if it is not. Given it is relatively cheap to start the container and check the state, I would like it to try no less than once every 10s. As-is, if the system is down, the restart delay can grow to an absurd length.
Things Which Will Not Work
Other Things Which Would Be Nice To Be Able To Adjust
The text was updated successfully, but these errors were encountered: