Repository navigation
Conversation
electrum
force-pushed
the
user/electrum/artifact-download-throughput-watchdog
branch
from
November 22, 2026 04:16
6f42378 to
56246f0
Compare
Artifact downloads only gave up on a connection when no data arrived for 30 seconds, so a connection that kept trickling data could take over an hour to finish without ever being retried. A download attempt is now aborted and retried on a new connection when less than 1 MiB/s arrived over the last 30 seconds. The last attempt runs without this check, so a connection that is slow on every attempt still completes.
electrum
force-pushed
the
user/electrum/artifact-download-throughput-watchdog
branch
from
November 22, 2026 04:40
56246f0 to
4ae93e0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Artifact downloads only give up on a connection when no data arrives for 30 seconds. A connection that keeps trickling data never hits that limit, so the download continues at whatever rate it gets and the existing retries are never used.
For example, a 1.98 GB artifact took 83 minutes to download (about 400 KB/s on average) in a single attempt with no retries. The same artifact normally downloads in 16 to 156 seconds.
With this change, once a download attempt has been running for 30 seconds, it is checked every second, and it is aborted and retried on a new connection if less than 1 MiB/s arrived on average over the trailing 30 seconds. A brief dip in an otherwise healthy download does not trigger it. Periods where the download is slow because writing to disk can't keep up are not counted, since a new connection would not help. A download like the one above, averaging well below 1 MiB/s for over an hour, must have at least one 30 second stretch below 1 MiB/s, so its first attempt would be aborted and retried instead of running to completion.
The last of the 5 attempts runs without this check, so a connection that stays below 1 MiB/s on every attempt still completes, after up to four aborted attempts of about 35 seconds each.
Related: