android-library icon indicating copy to clipboard operation
android-library copied to clipboard

Timeout when assembling large file uploads

Open minfaer opened this issue 3 years ago • 3 comments

As reported to the android-app repository in nextcloud/android#5609, uploading large files fails at 100% by timeout if the server takes too long assembling them. This results in an endless loop of retries and conflicts.

This can be fixed by increasing the read-timeout of the move-method that does the assembly in the chunk-upload. I tested setting the timeout to a flat 15 minutes similarly to what was done to version 1 of the library in #19. However, maybe that timeout should scale with the filesize only for files larger than some limit (like 100mb) and be left alone otherwise?

If desired, I can submit a pr for either solution.

minfaer avatar Aug 21 '21 11:08 minfaer

As the question came up in the aforementioned issue: the desktop-client adjusts the time-out depending on filesize in this function to 3 minutes per GB

minfaer avatar Aug 30 '21 18:08 minfaer

Thanks for this hint!

tobiasKaminsky avatar Aug 31 '21 06:08 tobiasKaminsky

Adjusting the timeout seems like the best idea. This issue has been wreaking havok for quite a while for my video uploads. I have almost 300gb of duplicate files!

gomme600 avatar Sep 02 '21 06:09 gomme600

Closed by #709

joshtrichards avatar Mar 20 '24 15:03 joshtrichards