Description
The default timeout for Docker push is too small for some larger layers. The behaviour is noted in https://stackoverflow.com/questions/41070528/docker-push-net-http-tls-handshake-timeout
This can be mitigated by increasing the timeout or as specified in the SO question reduce the number of concurrent operations. However, there's no capability of doing so with Docker in Azure Pipelines
Area for Triage:
Docker
Question, Bug, or Feature?:
Bug maybe Feature
Virtual environments affected
Expected behavior
We shouldn't get timeouts when uploading a large layer.
Actual behavior
We are getting timeouts when uploading a large layer on occassion. Rerunning sometimes helps.
Repro steps
A description with steps to reproduce the issue. If your have a public example or repo to share,
please provide the link.
Hi @trajano!
It would be great if you can provide such an image, it should help us a lot during investigation
I'll see if I can generate it for you but like I said it is pretty random.
I have an old docker image that we can probably use as it has a large 600MB layer.
docker pull trajano/jee-webserver:base
docker tag trajano/jee-webserver:base privaterepo.com/test
docker push privaterepo.com/test
Now the tricky part to simulate this would be to have the private repo behind a slow network.
Hey, @trajano!
I guess you can try to change this setting in runtime:
sudo sed -i 's/ }/, \"max-concurrent-uploads\": 5 }/' /etc/docker/daemon.json
sudo systemctl restart docker
Could you please check it?
Confirmed it works or at least does not crash. However, as I stated it does not always occur I'll open this again if needed. There should be an issue added to modify the Azure DevOps documentation regarding this but I can't find a good page for it, the closest I can think of is https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/docker-installer?view=azure-devops anyway I'll add an answer to Stack Overflow referencing your comment since people may be looking for it there.
Most helpful comment
Confirmed it works or at least does not crash. However, as I stated it does not always occur I'll open this again if needed. There should be an issue added to modify the Azure DevOps documentation regarding this but I can't find a good page for it, the closest I can think of is https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/docker-installer?view=azure-devops anyway I'll add an answer to Stack Overflow referencing your comment since people may be looking for it there.