Skip to content

feat(files_sharing): make the federated share request timeout configurable - #65938

Open
MarioPym wants to merge 1 commit into
nextcloud:masterfrom
MarioPym:feat/configurable-federated-share-timeout
Open

MarioPym wants to merge 1 commit into
nextcloud:masterfrom
MarioPym:feat/configurable-federated-share-timeout

Conversation

@MarioPym

Copy link
Copy Markdown

Summary

Requests sent by OCA\Files_Sharing\External\Storage to remote servers, including the shareinfo request and the reachability checks (e.g. against status.php or ocm-provider), rely on a hardcoded 10-second timeout. For large federated shares, the remote server may take longer to respond to shareinfo. The request then fails with cURL error 28 and the share is reported as unavailable, with no way to adjust the limit (as reported in #29941).

This change introduces the sharing.federation.request_timeout system configuration option (in seconds, defaulting to 10), which applies to both timeout and connect_timeout for these requests, and documents it in config.sample.php. The default value preserves the existing behavior. WebDAV requests for the same storage are unaffected and continue to use davstorage.request_timeout.

How to test

  1. Create a federated share from a remote server whose /index.php/apps/files_sharing/shareinfo takes more than 10 seconds to answer (e.g. a big share, or a remote that delays the response by 15 s).
  2. Accept the share and open it.
    • Before: getShareInfo() fails after 10 s with cURL error 28: Operation timed out after 10000 milliseconds.
  3. occ config:system:set sharing.federation.request_timeout --type=integer --value=20 and open it again.
    • After: the request completes (about 15 s in my test).
  4. Without the key the behavior is unchanged (fails after 10 s).

Unit test: apps/files_sharing/tests/ExternalStorageTest.php.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…rable

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Mario Alfonso Pym Mejía <pymm@hitss.com>
@MarioPym
MarioPym requested a review from a team as a code owner October 26, 2026 16:07
@MarioPym
MarioPym requested review from Altahrim, leftybournes, provokateurin and sorbaugh and removed request for a team October 26, 2026 16:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant