Nginx作为反向代理在源服务器响应之前发送意外的FIN

时间:2019-07-09 14:46:16

标签: http nginx tcp

Client ------ Nginx ------- Origin Server (by Play 2.6)
                 59105   9000

问题:对于一个API调用,客户端总是从Nginx收到502 Bad Gateway

Nginx日志:

nginx                          | 2019/07/09 14:27:56 [error] 15#15: *1 upstream prematurely closed connection while reading response header from upstream, client: 172.20.0.1, server: , request: "POST /api/company-account/retrieve-company-info HTTP/1.1", upstream: "http://192.168.1.93:9000/api/company-account/retrieve-company-info", host: "localhost"
nginx                          | 172.20.0.1 - - [09/Jul/2019:14:27:56 +0000] "POST /api/company-account/retrieve-company-info HTTP/1.1" 502 166 "-" "PostmanRuntime/7.13.0"

Wireshare: enter image description here

  • 我感到非常困惑,为什么nginx在等待约40秒钟后将FIN发送到原始服务器。
  • 我尝试了很多次,超时时间从30秒到50秒不等。

0 个答案:

没有答案