为什么Traefik服务的内容会被截断?

问题描述 投票:0回答:1

我在开发环境中的几个docker容器前面有一个Traefik反向代理。

我最近注意到,当通过端口80(Traefik)提供服务时,大文件被切断了。但是,如果我使用Docker容器上的本地HTTP端口下载文件,则文件很好。

这似乎只影响超过一定大小的文件。

我在我的一个Docker容器上生成了一个大文件。

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

如果我curl该文件并绕过Traefik(此容器上的端口4200),该文件是完整的,每次都具有相同的确切大小。如果我通过Traefik通过端口80 curl文件,文件将在一个看似随机的点被切断。

$ 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

基于这种行为,在我看来,这不是Docker问题,而不是我的Web服务器的问题。相反,似乎Traefik有错。

这是Traefik中的错误,还是潜在的错误配置?

docker reverse-proxy traefik
1个回答
1
投票

官方形象是https://hub.docker.com/r/_/traefik https://hub.docker.com/r/containous/traefik是由traefik团队制作的,但包含实验标签等......

关于你的问题,它可能与1.5.0-rc中的问题有关,你可以在这个问题上看到(https://github.com/containous/traefik/issues/2637),但这将在下一个1.5版本中修复

© www.soinside.com 2019 - 2024. All rights reserved.