nginx做负载后为什么超级慢

 我来答
匿名用户
2016-06-22
展开全部
upstream local {
server localhost:8080;
server localhost:8081;
}

server {
listen 80;
server_name localhost;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css|html)$ {
expires 30d;
}
location ~ ^/(WEB-INF)/ {
deny all;
}
location / {

proxy_pass http://local;
}
}

然后打开localhost,间歇性的非常卡,10秒都加载不出来页面。

错误日志里有这些记录,请问这问题该怎么解决?

2014/12/31 06:10:45 [error] 3204#688: *4 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: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://[::1]:8081/", host: "localhost"

2014/12/31 06:10:45 [error] 3204#688: *4 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: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://[::1]:8081/", host: "localhost"
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式