Timeout while uploading to remote storage
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 272
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I'm running Nextcloud Hub II (23.0.1 RC1) with Backup 1.0.4.
Creating a local backup works and occ backup:point:pack 202201... creates a pack.
When trying to use occ backup:point:upload 202201... I run into ConnectException cURL error 28: Operation timed out after 30000 milliseconds with 0 bytes received.
It seems to be kind of a server issue (https://github.com/nextcloud/server/issues/26071), since it ca be "resolved" by setting /path/to/nextcloud/lib/private/Http/Client/Client.php RequestOptions::TIMEOUT to a larger value (240s).
To link another of the countless related issues I came across: https://github.com/nextcloud/server/issues/18103
To me it looks like the "chunked" or whatever upload that is used by the web interface is not used by CLI operations. Since I have a rather slow (50 Mbit/s) DSL connection (on both server instances) it is not possible to transfer the 100MB files within the default 30s curl timeout.
As read in some other issue, I played around with the federated share:
- uploading ~100MB files via a link to the target server in web interface works nicely
- doing the same via the federated share (from the server I like to do the backup) I get the same 30s timeout.
Therefore, I don't really know if this repo is the correct place for the issue. Nevertheless, I guess it might serve as a workaround for others that run into the same problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the occ backup:point:upload entry point and compare its remote-storage path with the web and federated-share upload behavior described in the issue. Review the referenced Client.php timeout setting and related server issues, then verify that a roughly 100MB upload over a slow connection completes without the 30-second timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100