BadRequest Expected filesize of x bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) y bytes

@pitsinis

I ran into the same problem. My setup also uses Traefik with Docker containers, and I discovered that the issue started with Traefik version 2.11.2. Its default respondingTimeouts now set the readTimeout to 60 seconds. I fixed it by adding these lines to my compose:

services:
  traefik:
    command:
      - --entrypoints.web.transport.respondingTimeouts.readTimeout=0 
      - --entrypoints.websecure.transport.respondingTimeouts.readTimeout=0

For reference, see the Traefik migration notes on this change (Traefik Migration Documentation - Traefik) and the official docs on respondingTimeouts (Traefik EntryPoints Documentation - Traefik).
I also checked the Immich documentation for a similar configuration example (Reverse Proxy | Immich).

2 Likes