buildx icon indicating copy to clipboard operation
buildx copied to clipboard

improve constant connection timeouts

Open tonistiigi opened this issue 5 years ago • 4 comments

follow up from #323

https://github.com/docker/buildx/pull/323#issuecomment-660722140

Maybe we should make these configurable. 20 sec might be ok but overall this makes the experience worse for the cases where instances never connect.

Another approach might be to try to see if it is in the middle of connecting already. Only cancel with timeout it there was no response at all.

@saulshanabrook

tonistiigi avatar Aug 21 '20 19:08 tonistiigi

Another approach might be to try to see if it is in the middle of connecting already. Only cancel with timeout it there was no response at all.

That seems preferable! In that case, would it just keep waiting until it got a response or the network timed out?

saulshanabrook avatar Aug 22 '20 12:08 saulshanabrook

In that case, would it just keep waiting until it got a response or the network timed out?

There would still be a timeout. But currently, I believe the timeout is for getting the whole response from the server. If we already get some response we can assume that server is just slow and not unresponsive and increase or reset the timeout.

tonistiigi avatar Aug 22 '20 17:08 tonistiigi

Pending a more intelligent solution, could we use a shorter timeout, and add an option to ls to increase the timeout for slow connections?

Aposhian avatar Jun 03 '21 18:06 Aposhian

speaking of consistency, with the SSH connection over docker context we have 30 seconds timeout, however the direct remote connection timeout in docker buildx is 20 seconds, which is hardcoded in many places

not sure if you find this approach appropriate, but here is the PR: https://github.com/docker/buildx/pull/2586

avoidik avatar Jul 10 '24 14:07 avoidik