Reputation: 763
I have a Traefik reverse proxy in front of several docker containers in my dev environment.
I noticed recently that large files are being cut off when served over port 80 (Traefik). However, if I download the file using the local HTTP port on the Docker container, the file is fine.
This seems to only affect files that exceed a certain size.
I generated a large file on one of my Docker containers like so.
for ((i=1;i<=200000;i++)); do echo "$i some new line that has a reasonably long length and content" >> public/large-file.txt; done
If I curl
the file and bypass Traefik (port 4200 on this container), the file is intact and the same exact size every time. If I curl
the file over port 80 via Traefik, the file is cut off at a seemingly random point.
$ curl -O http://localhost/large-file.txt; cat large-file.txt
...
114633 some new line that has a reasonably long length and content
114634 some new line that has a reasonably long length and content
114635 some new line that has a rea
$ curl -O http://localhost/large-file.txt; cat large-file.txt
...
199732 some new line that has a reasonably long length and content
199733 some new line that has a reasonably long length and content
199734 some new line that has a re
Based on this behavior, it seems to me that this is not a Docker issue, and not an issue with my web-server. Rather, it seems like Traefik is at fault.
Is this a bug in Traefik, or a potential misconfiguration?
Upvotes: 0
Views: 687
Reputation: 236
The official image is https://hub.docker.com/r/_/traefik The https://hub.docker.com/r/containous/traefik is made by the traefik team but contains experimental tags etc...
About your problem, it may be linked to an issue in 1.5.0-rc as you can see on this issue (https://github.com/containous/traefik/issues/2637), but this will be fixed in the next 1.5 release
Upvotes: 1