# Too many 400 bad request

**URL:** <https://www.ruby-forum.com/t/too-many-400-bad-request/222367>\
**Category:** NGINX\
**Created:** [August 27, 2012, 2:01pm UTC](https://www.ruby-forum.com/t/too-many-400-bad-request/222367 "2012-08-27T14:01:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 27, 2012, 2:01pm UTC](https://www.ruby-forum.com/t/too-many-400-bad-request/222367/1 "2012-08-27T14:01:02Z")

</div>

Hi everyone,

I’ve deployed a server for rsync public mirror,and I use nginx as web  
server to display some html for visitors.

Now the problem is, too many 400 errors.

I paste “only a small amount of them” below:

# ================================= 216.216.33.242 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 174.128.254.98 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 216.216.33.242 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 207.99.82.229 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 173.255.246.181 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 206.53.187.66 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 173.255.246.181 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 216.40.205.154 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 67.222.104.104 - - [21/Aug/2012:03:02:05 -0700] “GET /centos/5.8/extras/x86\_64/repodata/repomd.xml HTTP/1.1” 200 2146 “-” “urlgrabber/3.1.0 yum/3.2.22” “-” 75.125.106.50 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 75.125.106.50 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 64.28.85.10 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 38.107.176.34 - - [21/Aug/2012:03:02:05 -0700] “GET /centos/5.8/os/i386/repodata/repomd.xml HTTP/1.1” 200 1140 “-” “urlgrabber/3.1.0 yum/3.2.22” “-” 174.36.195.24 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 132.239.242.24 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 64.156.195.66 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 199.180.132.136 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 173.228.120.18 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 209.119.87.126 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 174.137.174.201 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-” 208.70.208.200 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-”

Well,this really make me confused.And I’ve asked other mirror admins who  
use nginx,they all have this problem.

Is it caused by nginx?  
Do anyone know the solution?  
Thanks.

_Yours sincerely,_  
_Christopher M._

Ambassador/Contributor of Fedora Project and many others.

> **[Magic Transit LaB](http://cicku.me)**
>
> DDoS Protection for Networks - Cloudflare

---

<div class="post-metadata">

**Author:** ![tophe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/43a26b/32.png) [@tophe](https://www.ruby-forum.com/u/tophe)\
**Post date:** [August 27, 2012, 2:01pm UTC](https://www.ruby-forum.com/t/too-many-400-bad-request/222367/2 "2012-08-27T14:01:24Z")

</div>

Hello!

On Wed, Aug 22, 2012 at 12:38:23PM +0800, Christopher M. wrote:

> 216.216.33.242 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-”  
> 174.128.254.98 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-”  
> 216.216.33.242 - - [21/Aug/2012:03:02:05 -0700] “-” 400 0 “-” “-” “-”

Try looking e.g. here for a possible cause:

> **[400 bad request errors - Firefox and Chrome](http://mailman.nginx.org/pipermail/nginx/2011-September/029045.html)**

At least Chrome is known to cause such log entries if there aren’t  
many resources on a page requested due to additional connections  
being open and then closed without sending any single request in  
them.

[…]

> Well,this really make me confused.And I’ve asked other mirror admins who  
> use nginx,they all have this problem.
> 
> Is it caused by nginx?  
> Do anyone know the solution?  
> Thanks.

It’s just a way how nginx logs connections which are just opened  
and then closed. Confusing part is that some other web servers  
doesn’t seem to log anything in this case.

Maxim D.

---

<div class="post-metadata">

**Author:** ![tophe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/43a26b/32.png) [@tophe](https://www.ruby-forum.com/u/tophe)\
**Post date:** [August 27, 2012, 2:05pm UTC](https://www.ruby-forum.com/t/too-many-400-bad-request/222367/3 "2012-08-27T14:05:10Z")

</div>

I think I’ve met empty request…I will do a test tonight,thanks.
