tengine2.2.3报错502的The proxy server received an invalid response from an upstream server问题处理
现象:
访问订单的时候报错:
502 Bad Gateway
The proxy server received an invalid response from an upstream server. Sorry for the inconvenience.
Please report this message and include the following information to us.
Thank you very much!
Powered by Tengine
nginx的错误日志:
2019/01/23 21:56:23 [error] 3473#0: *118756 upstream prematurely closed FastCGI stdout while reading response header from upstream, client: 150.242.228.234, server: store.wondershare.net, request: "GET /checkout/repurchase/?code_id=9e6a16&from=cart&machine_no=eus HTTP/1.1", upstream:
"fastcgi://unix:/tmp/php-cgi.sock:", host: "store.chinasoft.net", referrer: "https://store.chinasoft.net/checkout/myCart/?code_id=9e6ab74ae2f&machine_no=eus"
4台服务器都是这样的配置绑定hosts的时候只有其中一台报这种错误
nginx.conf主配置:
fastcgi_buffer_size 128k;
fastcgi_buffers 4 129k;
改为下面的参数后问题解决:
fastcgi_buffer_size 128k;
fastcgi_buffers 32 32k;