nginx tomcat 访问问题
各位大侠,小弟遇到一个问题(nginx1.5.8+tomcat6+jdk6+windows2008,服务器在美国):
这周末前,国内(深圳)、美国等地客户客户机都能正常访问产品列表(列表数据通过ajax,调用app中的action返回)。但就在这两天深圳地区这边访问产品列表时,需要大概10分钟才能加载出来。而在福州和美国的朋友测试了下,都能正常的加载产品列表。我在深圳这边的网络环境正常,上网速度都很快,是光纤。请大侠们帮忙看看,分析下。不知是否与电信网络有关。
下面是主要配置:
nginx.conf
upstream location {
ip_hash;
server localhost:18081 weight=5;
server localhost:18082 weight=5;
}
location ~ \.(jsp|action)$ {
proxy_pass http://location;
#include proxy.conf;
}
location ~ \/(j_acegi_security_check)$ {
proxy_pass http://location;
#include proxy.conf;
}
proxy.conf
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
NGINX日志片段
error.log
2013/12/29 23:18:57 [info] 5436#4544: *304 client closed connection while waiting for request, client: 127.0.0.1, server: 0.0.0.0:80
2013/12/29 23:19:15 [info] 5436#4544: *228 client 183.16.199.105 closed keepalive connection (10054: An existing connection was forcibly closed by the remote host)
2013/12/29 23:19:25 [info] 5436#4544: *266 client 183.16.199.105 closed keepalive connection (10054: An existing connection was forcibly closed by the remote host)
2013/12/29 23:21:10 [info] 5436#4544: *316 client 66.249.73.119 closed keepalive connection
2013/12/29 23:23:31 [info] 5436#4544: *317 client 157.55.32.184 closed keepalive connection
2013/12/29 23:53:56 [error] 5436#4544: *319 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 183.16.199.105, server: localhost, request: "POST /search/loadGoodsVoForIdx.action HTTP/1.1", upstream: "http://[::1]:18082/search/loadGoodsVoForIdx.action", host: "www.powermuster.com", referrer: "http://www.powermuster.com/shop/clearance-sale.html"