Docker Push Timeout to AWS Elastic Container Registry

May 29, 2019

Tweet This:
Share on LinkedIn:

By Taylor Owen, Kovarus Automation Solution Architect

The other day I was having some problems with pushing a large container (1.4 GB+). I know … containers shouldn’t be that large, but it is and unfortunately out of my control. The problem I was running into was when I would try to push this container with multiple, large layers to ECR, some layers would succeed, but others would timeout. As a result, I was stuck in a manual retry loop trying to get this thing uploaded!

I noticed that when Docker would “push” it would try to upload 5 layers at the same time. Obviously, with my internet upload speeds it would timeout. I’m guessing you’re having the same issue or else you wouldn’t be reading this.

With some quick Google searching I found that the default upload concurrency is 5, and download is 3. To help with this I needed to tweak this nob down so it would only try to upload 1 layer at a time. It turns out the parameter for the Docker daemon is aptly named “max-concurrent-uploads,” but on macOS where do I set this!? Here’s how!

Click on the Docker icon in your menu bar and select Preferences.

Next, select the Daemon tab and click Advanced.

While using SPACES, not tabs…, enter the “max-concurrent-uploads” parameter with your desired maximum number of concurrent uploads, and don’t forget your comma.

Now click Apply & Restart, and you’re done!

Since I have tweaked this setting, I have not had an issue with timeouts. Feel free to increase this parameter to find which maximum number works best for you!

Looking to learn more about modernizing and automating IT? We created the Kovarus Proven Solutions Center (KPSC) to let you see what’s possible and learn how we can help you succeed. To learn more about the KPSC go to the KPSC page.

Also, follow Kovarus on LinkedIn for technology updates from our experts along with updates on Kovarus news and events.