Skip to content

Handle Too Many Requests Response (HTTP 429) #9441

@i2h3

Description

@i2h3

Problem

There is a real use case where a server with many files and folders was upgraded and as a consequence all clients are showering it with update requests simultaneously. At some point, the server stops serving the individual clients and provides a "429 Too Many Requests" response.

Situation

The synchronization engine of the desktop client is not handling that yet but considers it a generic error and will leave the item as it is until the next synchronization. The file provider code apparently does not consider this scenario either, just like NextcloudKit onto which it is built on. The latter is not responsible for handling this kind of business logic, anyway.

Solution

Implement a generic error handling for all network requests of a file provider domain which delays retries of failed (HTTP 429 specifically) network requests by either a fallback value or whatever the server is (possibly) defining in the "Retry-After" header, if it is higher than 0. Ensure the implementation is consistent with the classic desktop synchronization!

Note

This replaces the following issue: nextcloud/nextcloudfileproviderkit#114

Metadata

Metadata

Assignees

Labels

feature: 📁 file providermacOS File Provider Extension, more general also known as virtual file system.

Type

No fields configured for Bug.

Projects

Status
📄 To do

Relationships

None yet

Development

No branches or pull requests

Issue actions