Code-Hex / pget

The fastest, resumable file download client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Progress Bar freezes

SteadyStatus21 opened this issue · comments

The progress bar will freeze after about 5 seconds, and will not show it updating until you break (CTRL + C) and start the command again.

Any suggestions on how to fix this?

Thanks!

@SteadyStatus21 thanks for your reporting!

Could you tell me your environment?


What are you using version?

e.g. v0.0.6 or Go version if you build from source code

What are you using Go environment?

$ go env
<paste your result here>

Hey @Code-Hex!
I am using Windows 10 Home, version 21H2 with a AMD processor.
I am using the latest version in the releases tab, which of 12/31/2021 is v0.0.6 and the filename is pget_windows_amd64.zip.
The bug I encounter is when I use pget, the progress bar freezes and will not continue until I break the command prompt (CTRL + C) and run the same command again.
I am NOT using Go environment, however pget worked before and now does not. There is nothing that caused this besides the program itself, as I rarely update my computer.

Here is a GIF of my Command Prompt:
PGet Screen Recording

Thanks,
SteadyStatus21

@SteadyStatus21 Hi!
I update the progress bar library. Could you try again with the latest release? https://github.com/Code-Hex/pget/releases

Unfortunately, I don't have windows 10. So I need your help 🙇

Thanks

Hey @Code-Hex! I am glad to help with the development of pget on Windows 10!

I have tried the Ubuntu ISO again, but normally it would run without any errors. However, there is a TLS Handshake Timeout error.

See below GIF for details.

Animation

Hope this helps!
SteadyStatus21

@SteadyStatus21 Thanks for your reply.
TLS Handshake Timeout error is another topic in this issue. but let's explain why this error has happened.

The Internet, for example, has what is called bandwidth. It is also present in the internet connection (e.g. 4G, LTE) you are using. There is a maximum amount of bandwidth that can be connected at the same time, and you're probably getting more than that at the same time. (The option you are running is -p 1024, so you are using 1024 connections at the same time.)

If this amount is exceeded, the machine will perform scheduling (As a simple explanation, scheduling means waiting for other processes to finish and then restarting them when they are ready) for each connection. The more connections there are, the more scheduling processes occur, and the more machine resources start to be exhausted. This will happen both on your machine and on the server where the image will be distributed.

In other words, the more connections you have when you exceed a certain number of connections, it will be slower your download speed. I plan to remove the -p option in the future and use pget to assign the suitable number.

Currently, I can recommend a number such as -p 6. (I don't know the TCP window size of your machine, so this is just a guess) 1024 is almost the same as attacking the other server.

If you get the same error (TLS Handshake Timeout) with -p 6, please raise the issue again with that purpose.

Thank you.

Ah, I was using too many processes at the same time! Thank you! It seems that I overwhelmed my router and it blocked it because it thought I was trying to DDOS another server. Thank you and sorry about that 😅

SteadyStatus21