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

Download keeps restarting #860

Closed
Popolechien opened this issue Sep 18, 2018 · 4 comments
Closed

Download keeps restarting #860

Popolechien opened this issue Sep 18, 2018 · 4 comments
Labels
Milestone

Comments

@Popolechien
Copy link
Member

From OTRS

"I can't download Wikipedia (wikipedia_en_all_novid_2018-06) using Android Kiwix because it keeps restarting the download. So Kiwix will download say zimaa to zimad and a bit of zimae, then start again with zimaa.

I'm using a Samsung Galaxy 7 with Android 8.0.0 and the latest Kiwix, using WiFi only."

@MidUK
Copy link

MidUK commented Sep 24, 2018

I have this problem as well.

I'm trying to make it reproducible but it's slow to test.

It might be caused by a change of wifi.

I left it downloading all night last night and it was fine this morning when I checked it. I drove to the office and then checked on the status (in the same way that I did when I woke up this morning) and then it restarted - the only change being the wifi.

It's a serious waste of bandwidth too as I've downloaded around 60GB since I started and I'm back to downloading the first 2GB chunk again (zimaa). Whichever server the data is coming from must be getting hammered.

This could be worked around by downloading in one session but there's no way for me to download 77GB overnight - I would need to do it over at least 2 days and I can't do that without changing wifi.

Might I make a recommendation of how this could be fixed?
When the download starts, can the app:

  1. Check for a file of MD5 sums for each of the 2GB chunks. If it doesn't exist, download it.
  2. Check local storage for each entry in the MD5 file. If that file exists, compare it's hash and if it's the same, move onto the next entry. In all other cases, download a fresh copy.

This will ensure that wastage will be quantised into 2GB chunks rather than (potentially) 77GB.

Also, why isn't there a location where the 2GB chunks can be dowloaded? I appreciate you can download the full 77GB file and split it yourself but if you have any corruption, you need to download the entire file again. Also, not everyone will have the confidence to split the file themselves.

I'm on a Samsung S9+ with stock Android 8.0.0

Edit: Kiwix 2.4 Build 55

@mhutti1
Copy link
Contributor

mhutti1 commented Sep 30, 2018

Thanks for these suggestions. We are looking at reworking the download process. In regards to partial MD5 checksums thats not something that can be done on the Android end so I would refer that to @kelson42.

@kelson42
Copy link
Collaborator

@MidUK Plan is to secure download using metalink... but we are not so far on Android... but this has nothing to do with your problem of "restart". Please wait 2.5 release and let us know.

@kelson42 kelson42 added this to the 2.5 milestone Apr 19, 2019
@macgills
Copy link
Contributor

Fixed in #1170

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

No branches or pull requests

5 participants