Fault tolerance: Retry if file doesn't up or download within a time limit #265

Closed
jamshark70 opened this Issue Aug 9, 2012 · 6 comments

Projects

None yet

3 participants

@jamshark70

I am watching MobileOrg not syncing because it's stuck "Downloading checksums.dat." I'm afraid this will be a fairly typical situation for me. In mainland China, it happens often -- often -- that some packet doesn't get through and the transfer freezes. The only way to transfer a file, or load the rest of the webpage, or finish syncing my e-mail or whatever is to stop and retry.

MobileOrg doesn't have a stop/retry button anywhere. Even killing MobileOrg using Advanced Task Killer doesn't stop the transfer.

For fun, I just tried hitting the sync button again, and it did retry. I'm not sure if this will be consistent behavior.

In any case, it might be nice to have an option to tell MobileOrg, if a file transfer fails to complete within 30 or 60 seconds, stop that transfer and try again. We can't assume the network connection will always be reliable and that, just because we asked for the file from dropbox, ubuntu one or wherever, that it will necessarily come down without further action by MobileOrg.

@hdweiss
Collaborator
hdweiss commented Apr 7, 2013

We are using the new dropbox api now, has that solved your problem?

I have tried implementing a timeout function, but it doesn't seem to work right. This issue seems to be harder to resolve than I thought...

@hdweiss hdweiss was assigned Apr 7, 2013
@matburt
Owner
matburt commented Apr 7, 2013

I've tried to do this also and it is really difficult to reproduce and deal
with... the hope is that we will get an event when the connection closes
which seems to always happen with me when trying to reproduce it. Since
this was with the old api it might have just been a brief connection issue.

On Sun, Apr 7, 2013 at 11:49 AM, Henning Weiss notifications@github.comwrote:

We are using the new dropbox api now, has that solved your problem?

I have tried implementing a timeout function, but it doesn't seem to work
right. This issue seems to be harder to resolve than I thought...


Reply to this email directly or view it on GitHubhttps://github.com/matburt/mobileorg-android/issues/265#issuecomment-16017352
.

@jamshark70

Dropbox is blocked in mainland China, so the changing the dropbox API version will do nothing for me.

I experienced the issue many times with Ubuntu One. Then I gave up and set up a webdav server on my local machine. It's a bother that I can't sync anywhere except over my home WiFi router but at least there's no packet loss.

@hdweiss
Collaborator
hdweiss commented Apr 10, 2013

@jamshark70 when you are able to clear the sync notification, the sync process has stopped and you can retry syncing manually. The next version will add an option to prevent mobileorg from syncing if its not on wifi. I have tried adding a timeout feature, but it doesn't seem to be working properly with dropbox (haven't tried ubuntu one). The timeout is something that should be handled properly by the synchronization APIs we are using.

@matburt is it possible to specify a timeout in the Ubuntu One API?

@matburt
Owner
matburt commented Apr 10, 2013

I've added a hard 60s timeout on the ubuntu one synchronization (we have this on webdav also). For Dropbox those should be enforced in their libraries.

This should keep the connection attempt from dragging out indefinitely, @jamshark70 could you test this?

@matburt
Owner
matburt commented May 13, 2013

We've been sitting on this for a while and I think it's holding up the release... I'm closing so reopen if it is still an issue.

@matburt matburt closed this May 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment