nginx proxy超時報錯 upstream timed out (110: Connec...
環境介紹
伺服器:centos6.4
服務:nginx proxy
問題描述:
然後查詢 /opt/usr/nginx/1.4.0/logs 錯誤 error.log日誌提示如下
2015/01/04 15:44:13 [error] 10112#0: *994662 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 117.32.232.172, server: localhost, request: "POST /community-platform/datastatistics/datastatistics_exportAllUserDataDetail.action HTTP/1.1", upstream: "http://10.172.11.194:9080/community-platform/datastatistics/datastatistics_exportAllUserDataDetail.action", host: "admin.zhsqcn.com", referrer: "http://admin.zhsqcn.com/community-platform/datastatistics/datastatistics_communityStatistics.action?leftPid=98"
2015/01/04 15:45:22 [info] 10112#0: *994692 client closed connection while waiting for request, client: 117.32.232.172, server: 0.0.0.0:80
2015/01/04 15:57:10 [info] 10112#0: *994707 client 1.85.57.66 closed keepalive connection
2015/01/04 15:57:19 [info] 10112#0: *994711 client 1.85.57.66 closed keepalive connection
2015/01/04 15:57:19 [info] 10112#0: *994718 client closed connection while waiting for request, client: 1.85.57.66, server: 0.0.0.0:80
解決方法:vi /opt/usr/nginx/1.4.0/conf/nginx.conf
原因在於nginx proxy的超時時間太短
proxy_connect_timeout 3;
proxy_read_timeout 30;
proxy_send_timeout 30;
更改為
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
然後重啟nginx即可:
/opt/usr/nginx/1.4.0/sbin/nginx -s reload
環境介紹
伺服器:centos6.4
服務:nginx proxy
問題描述:
然後查詢 /opt/usr/nginx/1.4.0/logs 錯誤 error.log日誌提示如下
2015/01/04 15:44:13 [error] 10112#0: *994662 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 117.32.232.172, server: localhost, request: "POST /community-platform/datastatistics/datastatistics_exportAllUserDataDetail.action HTTP/1.1", upstream: "http://10.172.11.194:9080/community-platform/datastatistics/datastatistics_exportAllUserDataDetail.action", host: "admin.zhsqcn.com", referrer: "http://admin.zhsqcn.com/community-platform/datastatistics/datastatistics_communityStatistics.action?leftPid=98"
2015/01/04 15:45:22 [info] 10112#0: *994692 client closed connection while waiting for request, client: 117.32.232.172, server: 0.0.0.0:80
2015/01/04 15:57:10 [info] 10112#0: *994707 client 1.85.57.66 closed keepalive connection
2015/01/04 15:57:19 [info] 10112#0: *994711 client 1.85.57.66 closed keepalive connection
2015/01/04 15:57:19 [info] 10112#0: *994718 client closed connection while waiting for request, client: 1.85.57.66, server: 0.0.0.0:80
解決方法:vi /opt/usr/nginx/1.4.0/conf/nginx.conf
原因在於nginx proxy的超時時間太短
proxy_connect_timeout 3;
proxy_read_timeout 30;
proxy_send_timeout 30;
更改為
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
然後重啟nginx即可:
/opt/usr/nginx/1.4.0/sbin/nginx -s reload