【问题标题】:Why would content served by Traefik be truncated?为什么 Traefik 提供的内容会被截断?
【发布时间】:2017-12-06 16:43:21
【问题描述】:

我的开发环境中的几个 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 问题,也不是我的网络服务器的问题。相反,Traefik 似乎有错。

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

【问题讨论】:

    标签: docker reverse-proxy traefik


    【解决方案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 版本中修复

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-23
      • 1970-01-01
      相关资源
      最近更新 更多