Skip to content

Let a media upload that takes longer than 60 s finish #803

Open

Description

@HMarzban

Summary

A media upload whose body takes longer than 60 s to arrive fails with 502. Traefik v3 stops reading a request after its default readTimeout of 60 s, and scripts/traefik/traefik.yml sets no respondingTimeouts. The upload cap is 10 MiB (DEFAULT_MEDIA_MAX_FILE_SIZE), so a full-size file needs about 175 KB/s of upload speed. A phone on a weak connection has less.

Found 2026-11-20 while tracing the one real 5xx in the #710 7-day read.

Evidence (production, 2026-11-13)

Time (UTC) Route Traefik App Body bytes received
06:19:26 POST /api/plugins/hypermultimedia/:documentId 502 after 56.68 s 500, AbortError: The connection was closed., 56,605 ms 327,500
06:20:10 same route, same document 502 after 57.95 s 500, same error, 57,178 ms 229,250
  • The same person tried twice, at about 4-6 KB/s, over HTTP/2. Both tries failed, and the person saw a failed upload.
  • The app logs a client disconnect as 500 and sends it to GlitchTip. So the API error rule counted it as a server error: 3 breach minutes, no firing (Keep health checks out of the API error and latency alerts #710 (c)).

Benchmark

Field Value
Metric (1) Uploads that finish when the body takes longer than 60 s. (2) The status the app logs for a client disconnect
Before (1) 0 of 2 in production on 2026-11-13. (2) 500, and a GlitchTip event
After Not measured yet
Condition Local: Traefik with the repo config, a 10 MiB upload throttled to 100 KB/s, n = 5. Production: 7-day count of 502 on the media route
Pass rule (1) 5 of 5 finish. (2) A disconnect logs 499, sends no GlitchTip event, and stays out of the 5xx alert input

Steps

# Change Where Owner
U1 Set readTimeout on the websecure entry point long enough for a 10 MiB upload on a slow connection, for example 300 s. Keep idleTimeout short scripts/traefik/traefik.yml agent in the repo
U2 Log a client disconnect during an upload as 499, without a GlitchTip event the upload route's error handling agent in the repo
U3 The local throttled test, before and after, n = 5 local agent in the repo

U1 is a static Traefik change, so it ships in one Traefik restart with #746 and #802. A longer read timeout lets a slow client hold a connection longer, so it ships with #802's per-client cap, not before it.

Risk

Related

Activity

  1. added this to the v2.3.7 milestone on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DevOpsbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions