Nginx:504错误_Bad Gateway的解决方法

浏览器控制台输出:Failed to load resource: the server respondedwith a status of 504 (Gateway Time-out
可通过查看Nginx 中的logs找到问题所在(需要修改nginx.conf的顶上#error_log logs/error.log info 开启logs 然后重启Ng):
发现异常所在

2017/05/31 19:03:13 [error] 22358#0: *1upstream timed out (110: Connection timed out) while reading response headerfrom upstream, client: 223.223.204.244, server: localhost, request: "GET/platform/totalData HTTP/1.1", upstream:"http://10.163.171.188:94/platform/totalData", host:"rep.jinrongboshi.com", referrer: "http://rep.jinrongboshi.com/page/left.jsp"

问题解决:

location / {

       ...

       proxy_read_timeout 150; #重点

       ...

    }

在nginx.conf的location中添加proxy_read_timeout 150;

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值