diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2018-08-01 10:12:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-01 10:12:50 +0200 |
| commit | c9aca0343fff5fc7377f200b395d13b8335dadd1 (patch) | |
| tree | 46d0601ab4c6bda3b4e7b4841d6c3c5a818918c5 /src/bootstrap | |
| parent | a819a6ce380b54c156dc026185b1cad4e0e11898 (diff) | |
| parent | 2994b27e4033c2a0b77ab90f5a896ce09a122992 (diff) | |
Rollup merge of #52846 - kennytm:bootstrap-curl-timeout, r=Mark-Simulacrum
Add timeout to use of `curl` in bootstrap.py. Recently we've seen a lot of "30 minutes no output" spurious errors while downloading the bootstrap compiler. This added several timeout options so if the "30 minutes no output" errors were caused by connection or transfer issue, we could fail quicker for curl to retry.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 71c1c61e3d9..829487163a9 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -88,7 +88,10 @@ def _download(path, url, probably_big, verbose, exception): option = "-#" else: option = "-s" - run(["curl", option, "--retry", "3", "-Sf", "-o", path, url], + run(["curl", option, + "-y", "30", "-Y", "10", # timeout if speed is < 10 bytes/sec for > 30 seconds + "--connect-timeout", "30", # timeout if cannot connect within 30 seconds + "--retry", "3", "-Sf", "-o", path, url], verbose=verbose, exception=exception) |
