Specify --speed-limit and --speed-time for the fetch script#4457
Open
grahamc wants to merge 1 commit intorust-lang:mainfrom
Open
Specify --speed-limit and --speed-time for the fetch script#4457grahamc wants to merge 1 commit intorust-lang:mainfrom
grahamc wants to merge 1 commit intorust-lang:mainfrom
Conversation
This change will cause curl to cancel and retry the connection if the connection to the remote is exceedingly slow. Note this change does apply some "policy" by expecting the user's internet connection to be at least 20% the speed of modern DSL: If the connection can't sustain at least 250,000 bytes per second for 15 seconds, curl will disconnect and try again. I don't know if the rust project has data on users in that threshold or not, but this is upstreaming a change from our fork of this script in DeterminateSystems/nix-installer.
6 tasks
Member
|
@grahamc Thanks for submitting this patch! Would you mind providing more info about the rationale of this change though? Looking at the solution you are trying to resolve, I'm a bit worried that this will not be a generally good default for our users around the globe. Even if we are adding support for this, we might want to add an extra env var for opting in and specifying the low water mark. |
Author
|
@rami3l We've seen a number of users end up with a stalled download due to a bad route or similar. The connection is alive enough to not trigger timeouts and fail, but not alive enough to complete in a reasonable amount of time. The goal of this PR is to cause it to disconnect and retry on a fresh connection. |
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.
This change will cause curl to cancel and retry the connection if the connection to the remote is exceedingly slow.
Note this change does apply some "policy" by expecting the user's internet connection to be at least 20% the speed of modern DSL: If the connection can't sustain at least 250,000 bytes per second for 15 seconds, curl will disconnect and try again.
I don't know if the rust project has data on users in that threshold or not, but this is upstreaming a change from our fork of this script in DeterminateSystems/nix-installer.