erickutcher / httpdownloader

HTTP(S) download manager that uses input/output completion ports (IOCP).
https://erickutcher.github.io/#HTTP_Downloader
571 stars 62 forks source link

Smart "Stuck Part" Detection #282

Closed hl2guide closed 6 months ago

hl2guide commented 6 months ago

Sometimes nearly done downloads (say at 99.6% completed) get stuck for the last part (active parts 1/20) at a really slow download speed (11.5KB/s) after an average speed of around 12.00 MB/s up to that point.

I'm not sure of the cause, it could simply be a server behaviour.

Simply manually stopping the download and then starting it gets it to then run full speed and finish quickly.

Could you please consider detecting this situation automatically?

e.g. Pseudocode

IF DOWNLOAD IS STUCK AND SERVER SUPPORTS RESUMING
THEN STOP AND THEN RESUME IT 1 SECOND LATER
erickutcher commented 6 months ago

In the Connection options you can try setting "Reallocate parts to maximize connections". It'll kinda do what you're suggesting.