免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6460 | 回复: 1
打印 上一主题 下一主题

nginx反向代理异常 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-25 17:17 |只看该作者 |倒序浏览
我有一台nginx做反向代理的服务器

现在出了一个很奇怪的事情,就是当用户使用IE或者谷歌Chrome浏览器访问这台代理服务器所代理的网站时,报错"该页无法显示"。但是使用Firefox和Opera访问时却一切良好

nginx上的错误日志中重复出现下面的内容
#cat error.log
2009/05/25 16:42:17 [notice] 5944#0: signal 17 (SIGCHLD) received
2009/05/25 16:42:17 [alert] 5944#0: worker process 6194 exited on signal 11
2009/05/25 16:42:17 [notice] 5944#0: start worker process 6348
2009/05/25 16:42:17 [notice] 5944#0: signal 29 (SIGIO) received
2009/05/25 16:42:17 [notice] 5944#0: signal 17 (SIGCHLD) received
2009/05/25 16:42:17 [alert] 5944#0: worker process 6195 exited on signal 11
2009/05/25 16:42:17 [notice] 5944#0: start worker process 6349
2009/05/25 16:42:17 [notice] 5944#0: signal 29 (SIGIO) received
2009/05/25 16:42:17 [info] 6348#0: *227 client closed prematurely connection while reading client request line, client: 192.168.44.1, server: 192.168.44.151

后来针对红字部分在google上进行了查找,其中有这样的一个帖子,里面包含下面的内容(参考:http://www.ruby-forum.com/topic/173362)
Other browsers seems to have lower limits on total cookie size, and hence the problem doesn't manifest itself (instead, some cookies probably just discarded by other browsers).

Quick fix is to enlarge large_client_header_buffers.  And the next thing to tune is proxy_buffer_size, which in turn will require enlargement.

之后我优化了
    client_header_buffer_size 128k;
    large_client_header_buffers 8 128k;

除此外,还有如下参数
client_max_body_size    5m;
proxy_connect_timeout   15s;
proxy_send_timeout      1m;
proxy_read_timeout      1m;
proxy_temp_file_write_size 1024m;
proxy_buffer_size         64k;
proxy_buffers             4 64k;
proxy_busy_buffers_size 128k;

proxy_ignore_client_abort on;

proxy_next_upstream error timeout invalid_header http_503;

出现上面的故障,请高手给与帮助!非常感谢

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
2 [报告]
发表于 2009-05-25 17:27 |只看该作者
去张宴的BLOG看看吧,用他那现成的就没问题!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP