You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Been trying to debug why I'm getting ECONNRESET errors occasionally.
What I found was the following:
1 .The ECONNRESET error doesn't always result in dl.start() throwing. Often this results in the downloader retrying the request.
2. But sometimes it just halts with ECONNRESET.
3. When it halts with ECONNRESET, I've found that it doesn't even get to the redirect step (The URL i'm fetching involves a redirect).
Basically, I think this specific case of ECONNRESET is happening during the HEAD step and there is no handling logic to retry.
My current solution is to just retry the dl.start() multiple times until it eventually works. But I feel like this should be handled by the library, perhaps take a separate retryHead attribute that does the same thing as retry, but for the getTotalSize() request.
The text was updated successfully, but these errors were encountered:
Been trying to debug why I'm getting ECONNRESET errors occasionally.
What I found was the following:
1 .The ECONNRESET error doesn't always result in
dl.start()
throwing. Often this results in the downloader retrying the request.2. But sometimes it just halts with ECONNRESET.
3. When it halts with ECONNRESET, I've found that it doesn't even get to the redirect step (The URL i'm fetching involves a redirect).
Based on this, I've come to a conclusion that the ECONNRESET is happening at the HEAD step inside the
getTotalSize()
. It triggers the "error" event here: https://github.com/hgouveia/node-downloader-helper/blob/master/src/index.js#L365Basically, I think this specific case of ECONNRESET is happening during the HEAD step and there is no handling logic to retry.
My current solution is to just retry the
dl.start()
multiple times until it eventually works. But I feel like this should be handled by the library, perhaps take a separateretryHead
attribute that does the same thing asretry
, but for thegetTotalSize()
request.The text was updated successfully, but these errors were encountered: