Is it possible to set maximum delay timeout for re

2019-07-14 18:18发布

问题:

In docker docks it states:

An ever increasing delay (double the previous delay, starting at 100 milliseconds) is added before each restart to prevent flooding the server. This means the daemon will wait for 100 ms, then 200 ms, 400, 800, 1600, and so on until either the on-failure limit is hit, or when you docker stop or docker rm -f the container.

Let's say my container connects to database on startup. If database server is down, then container process exits with error. If database will be offline for a long time restart delay can grow to 5 minutes for example.

Is it possible to limit max delay to 10 seconds for example?

回答1:

I don't think you can do that with a container configuration.

Can you implement this delay directly on your application ?



标签: docker