1.502报错和504报错有什么区别
502 Bad Gateway
The server was acting as a gateway or proxy and received an invalid response from the upstream server.
504 Gateway Timeout
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server
502 Bad Gateway
The server was acting as a gateway or proxy and received an invalid response from the upstream server.
504 Gateway Timeout
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server
502是后端死了,连不上(可能无法建立TCP连接) ,504是后端活着,但没给我回应(至少TCP连接已经建立)
- 解决方法
- 502的情况需要检查后端服务器状态。
- 504的情况需要检查后端服务器响应情况,和nginx设置的超时时间