Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: applying speed limits to termux_download #20036

Open
twaik opened this issue May 6, 2024 · 2 comments
Open

[Enhancement]: applying speed limits to termux_download #20036

twaik opened this issue May 6, 2024 · 2 comments

Comments

@twaik
Copy link
Member

twaik commented May 6, 2024

Can we please make termux_download retry if speed falls to 0 for 30 seconds or longer?
Sometimes connection stucks for 10 minutes or more so updater-script is simply waiting for new data.
According to curl's man we should use --speed-limit and --speed-time options.

if curl --fail --retry 20 --retry-connrefused --retry-delay 30 --location --output "$TMPFILE" "$URL"; then

@twaik
Copy link
Member Author

twaik commented May 8, 2024

To avoid this:

Downloading https://github.com/pypa/pip/archive/24.1b1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  160k    0  160k    0     0    266      0 --:--:--  0:10:13 --:--:--     0
curl: (56) OpenSSL SSL_read: Connection timed out, errno 110
Failed to download https://github.com/pypa/pip/archive/24.1b1.tar.gz
ERROR: failed to build.

It was waiting for 10 minutes only to say connection timed out.

@TomJo2000
Copy link
Member

To avoid this:

Downloading https://github.com/pypa/pip/archive/24.1b1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  160k    0  160k    0     0    266      0 --:--:--  0:10:13 --:--:--     0
curl: (56) OpenSSL SSL_read: Connection timed out, errno 110
Failed to download https://github.com/pypa/pip/archive/24.1b1.tar.gz
ERROR: failed to build.

It was waiting for 10 minutes only to say connection timed out.

Huh I was actually working on Pip right now, I found some other stuff I need to look into first, but I updated the regex for valid versions in #20050, could you please double check that I did that correctly if you have a minute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants