axel-download-accelerator / axel

Lightweight CLI download accelerator
GNU General Public License v2.0
2.84k stars 258 forks source link

Download stuck at 99% #391

Open AlterDime opened 1 year ago

AlterDime commented 1 year ago

I was trying to download a 67GiB file with axel with 8 threads using the command:

axel --verbose -n 8 https://download1.graphhopper.com/public/photon-db-latest.tar.bz2

And everything was fine and dandy till 99% download, until I notices my download would not progress anymore and was stuck at 99% for more than an hour:

Connection 1 finished
Connection 5 finished
        ,,,....... .......... .......... .......... ..........  [1674.4KB/s]
[ 99%]  .......... .......... .......... .......... ..........  [1674.4KB/s]
[ 99%]  .......... ...
Connection 3 finished
        ,,,,,,,,,, ,,,....... .......... .......... ..........
Connection 7 finished
        ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,,  [1674.3KB/s]
[ 99%]  .......... .......... .......... .......... ..........  [1674.3KB/s]
[ 99%]  ........
Connection 4 finished
        ,,,,,,,,

So I CTRL-Cd and started the download again:

Now its stuck with starting the download with:

axel --verbose -n 8 https://download1.graphhopper.com/public/photon-db-latest.tar.bz2
Initializing download: https://download1.graphhopper.com/public/photon-db-latest.tar.bz2
File size: 70532141013 bytes
Opening output file photon-db-latest.tar.bz2
State file found: 70468053044 bytes downloaded, 64087969 to go.
Starting download

        ,,,,,,,,^C
Downloaded 0 byte(s) in 1:34 minute(s). (0.00 KB/s)

The contents of my .st file looks like this with $cat photon-db-latest.tar.bz2.st:

4(9h�)N
         �)N
             �#�L
                 �#�L
                       �L
                               �L
                                  $�*N
                                      $�*N
                                          �E&N
                                              �E&N
                                                  ���L
                                                      ���L
                                                          2_%N
                                                              2_%N
                                                                  �(N
                                                                     �(N
                                                                        %

Am I just being jumpy or is there an actual issue with my download?

ismaell commented 1 year ago

Looks like an actual issue at first sight.

ismaell commented 1 year ago

What's the output of axel --version?

ismaell commented 1 year ago

I tried downloading the file and it worked fine for me:

$ axel --version|sed 1q
Axel 2.17.11 (linux-musl)
$ axel -n8 https://download1.graphhopper.com/public/photon-db-latest.tar.bz2
Initializing download: https://download1.graphhopper.com/public/photon-db-latest.tar.bz2
File size: 65.6882 Gigabyte(s) (70532141013 bytes)
Opening output file photon-db-latest.tar.bz2
Starting download

Connection 2 finished
Connection 4 finished
Connection 5 finished
Connection 1 finished
Connection 6 finished
Connection 2 finished
Connection 1 finished
Connection 7 finished
Connection 6 finished
Connection 4 finished
Connection 0 finished
Connection 7 finished
Connection 1 finished
Connection 3 finished
Connection 5 finished
Connection 6 finished
Connection 0 finished
Connection 4 finished
Connection 2 finished
Connection 7 finished
Connection 1 finished
Connection 6 finished
Connection 2 finished
Connection 3 finished
Connection 5 finished
Connection 4 finished
Connection 0 finished
Connection 7 finished
[100%] [............................................................................] [  70.2MB/s] [00:00]

Downloaded 65.6882 Gigabyte(s) in 15:57 minute(s). (71934.67 KB/s)
AlterDime commented 1 year ago

Thank you for replying.

My axel version is Axel 2.17.11 (linux-gnu). And yes I can confirm that when I retried downloading (removed previously downloaded file, and redownloaded) it completed fine for me as well.

But the above issue had occurred when the servers might close connection in between and axel tried to reconnect. I will try to reproduce this issue and when I can get any update I will update this issue.

ismaell commented 1 year ago

Does re-running without deleting the file work?

LarkPix commented 1 year ago

Met the same problem, could add whole download time check in function main(), after procedure axel_start(). while (!axel->ready && run && time_use_check()) to end the download and retry