nginx+tomcat nginx 504 Gateway Time-out的方法

来源:互联网 发布:淘宝店pc端怎么装修 编辑:程序博客网 时间:2024/05/16 10:55
解决nginx 504 Gateway Time-out的方法

应用是nginx+tomcat7

根据这个错误,是因为tomcat没有及时回应nginx,导致错误.

先使用 fiddler 将页面的请求抓出来.

找到504的请求.然后查找原因.

因为这个请求时间比较长,只有90秒.

所以修改

proxy_connect_timeout 90;

proxy_send_timeout 90;

proxy_read_timeout 90;

修改成

proxy_connect_timeout 18000; ##修改成半个小时

proxy_send_timeout 18000;

proxy_read_timeout 18000;



http://www.07net01.com/zhishi/188736.html