-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add config variable for curl timeout #38292
Add config variable for curl timeout #38292
Conversation
Similar pr: #35461 |
Thanks for the pointer to the PR. Actually, that was one I haven't found :) |
Currently, I use the PR for discussions and as base for testing with my local instances.
|
I see. However this is not the correct place to fiy this. You will need to find the correct place e.g. in the files_sharing or files_external app and add your code there. |
The good news: I was able to verify that these two lines of code are able to resolve the issues with federation shares and large files. Therefore, you can simply set the value of remote_curl_timeout to a suitable amount of time > 30s. That's some kind of hotfix, but resolves the issue for me and my friends. The question is now whether this is the right location for the change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your pull request 👍
Add a configuration option to increase the timeout for dav requests seems reasonable to me.
I hope the changes fit from your point of view. |
To replace the deprecated getConfig. |
I'll handle the suggestion asap. Probably, after work :) |
Maybe this setting should be documented here https://github.com/nextcloud/documentation/blob/master/admin_manual/configuration_files/federated_cloud_sharing_configuration.rst and possibly here https://github.com/nextcloud/documentation/blob/master/admin_manual/configuration_files/big_file_upload_configuration.rst? |
I've proposed changes here: nextcloud/documentation#10618 |
Add the config variable for curl calls ("remote_curl_timeout"). E.g., needed for nextcloud federation. Signed-off-by: Dominik Fuchß <develop@fuchss.org>
Signed-off-by: Dominik Fuchß <develop@fuchss.org>
Signed-off-by: Dominik Fuchß <develop@fuchss.org>
@dfuchss I let GitHub rebase your pull request to pull in the latest changes from master. This should give us a successful CI run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine code wise. Didn't test it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but didnt test as well
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
Docu in nextcloud/documentation#10618 |
Is this going to get backported to |
@kesselb ? 🤷 |
/backport to stable27 |
It looks like a reasonable and not too risky change, therefore a backport for 27 and 26 should work. Strictly speaking, it's a new feature, which we usually do not backport. I'm unable to make this choice. |
Lets only backport to 27 then |
Summary
Add the config variable for
davstorage.request_timeout
in order to define remote timeouts.Needed for nextcloud federation with large files.
Details on errors:
Basically, you encounter two types of errors when dealing with large files in federated shares (see below).
In both cases you get a timeout because the put / get command is not finished in 30s (hard coded in the defaults; see lib/private/Http/Client/Client.php). This PR introduces the configuration variable
davstorage.request_timeout
which replaces this default timeout in the get/put command of the DAV module. The DAV module is used by the federated share to transfer data between two cloud instances.Download from Federated Share:
Upload to Federated Share:
Checklist