Retry downloads that fail on ECONNRESET
See original GitHub issueAn issue that’s observed pretty frequently is downloads dying with a traceback like this:
Collecting virtualenv
Downloading virtualenv-12.0.7-py2.py3-none-any.whl (1.8MB)
45% |############## | 819kB 12.8MB/s eta 0:00:01 Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/basecommand.py", line 232, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/commands/install.py", line 339, in run
requirement_set.prepare_files(finder)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/req/req_set.py", line 355, in prepare_files
do_download, session=self.session,
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 782, in unpack_url
session,
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 667, in unpack_http_url
from_path, content_type = _download_http_url(link, session, temp_dir)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 843, in _download_http_url
_download_url(resp, link, content_file)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 615, in _download_url
for chunk in progress_indicator(resp_read(4096), 4096):
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/utils/ui.py", line 46, in iter
for x in it:
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 580, in resp_read
decode_content=False):
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 256, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 186, in read
data = self._fp.read(amt)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/_vendor/cachecontrol/filewrapper.py", line 49, in read
data = self.__fp.read(amt)
File "/usr/lib/python2.7/httplib.py", line 561, in read
s = self.fp.read(amt)
File "/usr/lib/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
File "/usr/lib/python2.7/ssl.py", line 241, in recv
return self.read(buflen)
File "/usr/lib/python2.7/ssl.py", line 160, in read
return self._sslobj.read(len)
error: [Errno 104] Connection reset by peer
It’d be great if we could retry these.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How do I debug error ECONNRESET in Node.js?
A break in the connection from the client throws the error ECONNRESET in Node. I believe this is intended functionality for Node, so...
Read more >OS error "ECONNRESET" : r/deemix - Reddit
When downloading an album, at least one of the tracks usually generates this error and the track itself is incomplete. Deemix then moves...
Read more >Download Build Artifacts get error: ECONNRESET
When downloading build artifacts through a relase pipeline I am getting the following: 2019-06-17T11:55:28.1868361Z ##[section]Starting: Download artifact ...
Read more >Fix file download errors - Google Chrome Help
If you get an error message on Chrome when you try to download apps, themes, extensions, or other files, try these fixes. Fix...
Read more >What does “Error: read ECONNRESET” mean? - Quora
It means that your application dropped it's TCP connection. For example, if you lost your wifi signal while running your app you would...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am more inclined to let upstream fix this, or investigate in alternatives like httpx and see whether there is a fix. The increased complexity in pip is not worth it.
I don’t think anything changed.