conda-mirror icon indicating copy to clipboard operation
conda-mirror copied to clipboard

How to catch stalling HTTP connections?

Open willirath opened this issue 6 years ago • 1 comments

I'm struggling with an uplink that has stalling HTTP connections from time to time. Currently, conda-mirror just seems to wait forever if this happens during a download. Is there any easy way of adding a timeout / retry on timeout here?

willirath avatar Apr 26 '18 06:04 willirath

We should set a timeout on the requests.get call in _download, ref. http://docs.python-requests.org/en/master/user/quickstart/#timeouts

This change can be implemented as a command line argument (--timeout) with a default value.

What would be a good value, though? A quick web seearch suggests some products use 10 seconds while other use 2-3 minutes +

magnuhho avatar Oct 25 '18 07:10 magnuhho