Nginx报错:upstream timed out (110: Connection timed out)和client intended to send too large body【转】

nginx日志报错

2018/01/26 16:36:49 [error] 23327#0: *54953 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.68.16.37, server: 10.70.35.119, request: "POST /ApprovalManagement.do?method=approveShow&listType=A&approveType=change&opdb=mod&opinionId=15056 HTTP/1.1", upstream: "http://10.70.35.120:8080/ApprovalManagement.do?method=approveShow&listType=A&approveType=change&opdb=mod&opinionId=15056", host: "10.72.35.119", referrer: "http://10.70.35.119/ApprovalManagement.do?method=flowToList&listType=A"
2018/01/26 17:14:53 [error] 23325#0: *57462 client intended to send too large body: 2008762 bytes, client: 10.2.176.48, server: 10.70.35.119, request: "POST /ApprovalManagement.do?method=checkFileSize HTTP/1.1", host: "10.70.35.119", referrer: "http://10.70.35.119/ApprovalManagement.do?method=approveShow&listType=B&approveType=new&opdb=mod&opinionId=15014"
 

第一个错误,为代理超时

第二个错误,为client发送body size太大了

解决办法(见绿色部分):

    server {
listen ;
server_name 10.70.35.119;
#rewrite ^(.*) https://$10.72.16.112$1 permanent;
#rewrite ^(.*) https://$server_name$1 permanent;
location / {
proxy_pass http://jboss;
proxy_redirect off;
proxy_set_header Host $host;
# proxy_set_header Host $proxy_host;
# proxy_set_header Host $host:$server_port;
proxy_hide_header Server;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
client_max_body_size 10m;
client_body_buffer_size 328k;
#proxy_buffering off
proxy_connect_timeout ;
proxy_send_timeout ;
proxy_read_timeout ;
proxy_buffer_size 320k;
proxy_buffers 320k;
proxy_busy_buffers_size 640k;
proxy_temp_file_write_size 640k; }

然后重新加载nginx配置文件

service nginx reload

后续记录,设置完以上俩项后,nginx错误日志还是有以上俩个错误,解决办法增加以下参数设置成600s。client_max_body_size参数大于报错大小,暂不调整。

                proxy_connect_timeout ;
proxy_send_timeout ;
proxy_read_timeout ;

转自

nginx proxy超时报错 upstream timed out (110: Connec... - 深海蓝精灵 - 博客园
https://www.cnblogs.com/zhangkaimin/p/4201453.html

上一篇:JS 页面表格的操作


下一篇:XML wsdl soap xslt xsl ide