Increase docker timeout to join a network

Viewed 22

In our environment we use docker swarm to run some jobs heavily consuming ressources. Those get started and end after some time.

We start the the containers using docker run --rm --memory=18000m --memory-swap=18000m --oom-score-adj=900 -v /some/mount/point:/opt/workspace/mount-point --network someOverlayNetwork --name someName privateRegistry/imagename:version -c "do what to do"

Sometimes this call fails with

docker: Error response from daemon: Could not attach to network someOverlayNetwork: context deadline exceeded.

As far I found out context deadline exceeded is the generic way of go to say some timeout happened. I also see the error happens quite exactly 20s after the docker run command. And it makes sense, there might be quite a lot of things going on in the cluster in terms of load and network load.

I have no problem to wait more time until the next job run starts, but breaking up the job start causes problems for us.

So the question: Is it possible to increase the timeout docker run has to enter a network?

0 Answers
Related