nextcloud / nextcloud/desktop

Error Handling on Server errors - limit retries

Open
#6,971 1 comment 4 reactions 1 assignee Claimed by @camilasan View on GitHub
feature: :arrows_counterclockwise: sync engine
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 21h
Merged PRs (30d)
127

Description

### How to use GitHub

* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you want to have the same feature implemented.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.

(I don't know if it is a real feature request or maybe a bug, because i didn't find a description of the expected behavior after an error occurs. I will use this template here, maybe it is wrong.)

### Feature description
The client should handle some types of errors differently. There are some conditions, where it makes no sense to retry or to try sync every file left after an error occurs consuming a lot of bandwidth and server resources:
- The server returned a 5xx answer (because of an error or maintenance)
- The login does not work (due to account expiration or deleted accounts, especially ldap accounts)
- The client's quota is full

In these cases, the client should pause the entire synchronization for this account for some time and retry afterwards. If the error occurs again, the waiting time should be extended. Maybe in 5 minute steps (1,5,10,20...) until a maximum of 2 hours (numbers as examples). It's would be a good idea to add a random number of seconds, so multiple clients would not start the retry nearly at the same time after a server outage.
Also should repeated errors presented to the user in a more noticeable way as only in the status panel. Maybe as notification like the one if the client cannot connect to the server.

### Quota full
- At the moment, if a user quota is full, the client is still trying uploading files using a lot of bandwidth to always get an error as response. This will result in using up the server bandwidth and hundreds of log entries on the server.
- Of course there are scenarios (e.g, one/some really big files and a lot of small files) where it will maybe a good idea to sync the small files anyway, but as the client knows the space left, so it can check this in advance and not upload files bigger than the space left

### Maintenance / Server outage
- At the moment, after a maintenance or solving a server problem, a lot of clients try to sync at the same time, causing a very high load for some minutes. A random wait time will solve this.

### Login errors
- Some users "forget" to uninstall / reconfigure clients if the account is expired or deleted, so it will try forever to re-login. It would be nice to disable the client / tell the user to re-login if multiple login requests fail.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.