我在前端使用nginx做负载均衡,而后端也是使用nginx + php-fpm的docker实例;
问题是我的后端nginx返回499,而前端nginx返回502;
我认为这是因为前端nginx关闭了连接;
但是前端nginx的keepalive_timeout = 65;
也是proxy_connect_timeout = 6,
但是当返回502时,日志显示
"3.002" "10.154.30.153:31010" "502" "3.002"
log_format:
'"$request_time" "$upstream_addr" "$upstream_status" "$upstream_response_time"';

由于$upstream_response_time
是3.002。为什么它返回代码502?
希望你能帮我分析一下,非常感谢你!