NGINX反向代理:许多html状态代码400响应,为什么? [英] NGINX Reverse Proxy : Many html status code 400 responses, why?

查看:264
本文介绍了NGINX反向代理:许多html状态代码400响应,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近实现了基于nginx的反向代理.

We have recently implemented a nginx based reverse proxy.

在调试访问日志时,我们看到了很多状态码400结果.

While, debugging our access logs, we are seeing quite a bit of status code 400 results.

它们看起来像这样:

[07/Sep/2011:05:49:04 -0700] - "400" 0 "-" "-" "-"

我们已启用调试错误日志记录,它们通常对应于以下内容:

We have enabled debug error logging, and they usually correspond to something like this:

2011/09/07 05:09:28 [info] 5937#0: *30904 client closed prematurely connection while reading client request line

我们尝试增加一些缓冲区,正如我们能够谷歌搜索的几页所提到的.

We have tried raising a number of the buffers, as mentioned by a few pages we were able to google up.

http://www.ruby-forum.com/topic/173362

http://blog.craz8.com/articles/2009/06/17/nginx-400-bad-request-errors-due-to-cookies-and-what-to-做关于他们的事

无济于事.

为什么会这样?

这是一个糟糕的nginx反向代理-> apache后端服务器.

This is a strandard nginx reverse proxy -> apache backend server.

值得一提的是,我们网站上独特的内容类型非常少.我们已经使用许多浏览器对此进行了测试,并且没有亲自收到这400个结果中的任何一个.

Worth mentioning, the unique type of content on our site is fairly minimal. We have tested this using many browsers and are not personally receiving any of these 400 results.

谢谢!

详细描述其日志中类似条目的其他网址:

Further urls detailing similar entries in their logs:

http://blog.rayfoo.info/2009/10/weird-web-server-access-log-entries

推荐答案

我发现这是由于使用Chrome引起的,它显然偶尔会打开额外的连接,而不会发送任何数据.

I found this was caused by using Chrome, which apparently opens extra connections occasionally without sending any data.

这里有更多信息: http://www.ruby-forum.com/topic/2953545

现在的问题是如何对他们进行处理-前提是那里的回答不是很令人满意.

Now the question is what to do about them - the answer provided there wasn't very satisfying.

这篇关于NGINX反向代理:许多html状态代码400响应,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆