openSUSE / osc

The Command Line Interface to work with an Open Build Service
http://openbuildservice.org/
GNU General Public License v2.0
170 stars 185 forks source link

IPv6 https timeout is too long. #1658

Open Firstyear opened 3 weeks ago

Firstyear commented 3 weeks ago

If osc can resolve a remote service with an ipv6 address, but the ipv6 endpoint is not accessible (fails to connect), osc hangs for large periods at a time. The timeout for each connection is in minutes rather than seconds.

This means on a host with ipv6, that for some reason fails to connect to https://api.opensuse.org, each connection takes 60 - 120 seconds to fail, causing osc to take forever to achieve anything.

osc should have a faster timeout for connection failures. I'm sure 5 seconds would be reasonable. Or at least something configurable.

dmach commented 2 weeks ago

Osc has 3 retries by default with backoff factor 2. That means it usually fails in about 12 seconds.

Are you sure the endpoint is not really accessible? Isn't the connection only extremely slow? If the connection gets established and data is flowing (even at a minimal rate), the timeout doesn't trigger, I think.

Firstyear commented 2 weeks ago

I see more than 60 seconds to timeout. :(