Configuring Traefik readTimeout for large file uploads
When uploading large files, the default readTimeout of 60 seconds in Traefik might not suffice. In such cases, you can configure Traefik to disable the default timeout.
- Run the following Kubernetes command to edit the Traefik
ConfigMap:
kubectl edit configmap traefik-config -n mlx
- In the ConfigMap file, locate and modify the traefik.toml section
to include the following custom
readTimeout:
[entryPoints.websecure.transport] [entryPoints.websecure.transport.respondingTimeouts] readTimeout = 0
For example, after adding the above changes, your traefik.toml file should look similar to:# traefik.toml [global] checkNewVersion = false sendAnonymousUsage = false [entryPoints.web] address = ":80" [entryPoints.web.http.redirections.entryPoint] to = "websecure" scheme = "https" [entryPoints.websecure] address = ":443" [entryPoints.websecure.transport] [entryPoints.websecure.transport.respondingTimeouts] readTimeout = 0 [entryPoints.websecure.http.tls]
- Save and apply the updated ConfigMap to your cluster for the changes to take
effect.
kubectl rollout restart deployment/traefik -n mlx