owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
437 stars 157 forks source link

Web doesn't react to 429 Too Many Requests in preview requests #11798

Open kulmann opened 2 days ago

kulmann commented 2 days ago

Describe the bug

When web makes requests to the previews webdav endpoint, a 429 Too Many Requests error can occur, possibly with a Retry-After header. Web doesn't react with retries at the moment.

Steps to reproduce

  1. Limit the thumbnail service to 2 concurrent preview image creations via THUMBNAILS_MAX_CONCURRENT_REQUESTS env var
  2. Request 10 images via file list

Expected behavior

The failed requests don't get retried.

Actual behavior

The web ui should react to 429 responses with retries.

Additional context

There are several places in the code / ui where preview requests happen and can fail:

All of those requests should be retried if they failed with a 429 status code. If the response has a Retry-After header it should be respected. If it's absent we should come up with a suitable retry offset on our own.

Backend context:

kulmann commented 2 days ago

cc @JammingBen @rhafer