为什么 Traefik 提供的内容会被截断?
Why would content served by Traefik be truncated?
我在我的开发环境中的几个 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),文件将完好无损并且每次都具有相同的精确大小。如果我 curl
通过 Traefik 通过端口 80 传输文件,文件会在一个看似随机的点被截断。
$ 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 问题,也不是我的网络服务器的问题。相反,似乎 Traefik 有问题。
这是 Traefik 中的错误,还是潜在的错误配置?
官方图片为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 版本中得到修复
我在我的开发环境中的几个 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),文件将完好无损并且每次都具有相同的精确大小。如果我 curl
通过 Traefik 通过端口 80 传输文件,文件会在一个看似随机的点被截断。
$ 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 问题,也不是我的网络服务器的问题。相反,似乎 Traefik 有问题。
这是 Traefik 中的错误,还是潜在的错误配置?
官方图片为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 版本中得到修复