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

timeout does not take effect #421

Open
Dreamcoke opened this issue Jan 8, 2024 · 3 comments
Open

timeout does not take effect #421

Dreamcoke opened this issue Jan 8, 2024 · 3 comments

Comments

@Dreamcoke
Copy link

Hi,I use the timeout parameter to download a file in a single thread and set the timeout to 1s. The file download takes 6s. It seems that the timeout does not take effect. The file will continue to download without interruption. What is the meaning of the timeout parameter? The following is the axel version and test cases
axel -V
Axel 2.17.11 (darwin22.1.0)

time axel -n 1 --timeout=1 http://nos2-i.service.163.org/nim/MjYyNDYzMzg\=/bmltYV8xOTc1MDEyMjQzMzVfMTcwMjAzNTg5MTY4MF9mODkyNWYzNC1mODk5LTRlZDUtODY2MC1hNzk1NGZkNmU5NDU\=
Initializing download: http://nos2-i.service.163.org/nim/MjYyNDYzMzg=/bmltYV8xOTc1MDEyMjQzMzVfMTcwMjAzNTg5MTY4MF9mODkyNWYzNC1mODk5LTRlZDUtODY2MC1hNzk1NGZkNmU5NDU=
File size: 11.4211 Megabyte(s) (11975921 bytes)
Opening output file MjYyNDYzMzg_3D_2FbmltYV8xOTc1MDEyMjQzMzVfMTcwMjAzNTg5MTY4MF9mODkyNWYzNC1mODk5LTRlZDUtODY2MC1hNzk1NGZkNmU5NDU_3D.12
Starting download

[100%] [................................................................................................................................................................................................................................................] [ 1.8MB/s] [00:00]

Downloaded 11.4211 Megabyte(s) in 6 second(s). (1875.52 KB/s)
axel -n 1 --timeout=1 0.07s user 0.17s system 3% cpu 6.667 total

@colemar
Copy link

colemar commented Jan 16, 2024

I believe the timeout is for stopping axel as soon as the allotted time passes without response from the remote host.
If the remote server sends some data before the timeout expires, axel resets the timer and continues.
Does this make sense?

@colemar
Copy link

colemar commented Jan 16, 2024

Well it seems that the timeout does not matter when the remote host does not accept the connection.
In this situation, axel blocks waiting forever.

I mean, when this happens:

$ ncat -v str-28.filestore.app 443
Ncat: Version 7.80 ( https://nmap.org/ncat )
Ncat: Connection to 88.208.57.132 failed: TIMEOUT.

then this does not stop:

axel --num-connections=1 --timeout=2 https://str-28.filestore.app/

Then, what is timeout for?

@ismaell
Copy link
Member

ismaell commented Feb 6, 2024

It isn't implemented for the connection attempt, currently. Patches welcome.

@ismaell ismaell modified the milestones: v2.17.14, v2.17.15 Apr 12, 2024
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