Welcome! Log In Create A New Profile

Advanced

Re: Any way to deal with clients breaking the limit zone

January 13, 2012 01:55AM
Hello Maxim,

I am surely aware of how server requests are matched in nginx. Thanks for the info though.

The thing is, I have multiple virtual hosts configured all with server_name defined, of course. Then there's default fallback server configured as this:

# default fallback server
server {
listen 80 default_server;
server_name _;
return 444;
}

After reading your reply I went to check my error logs and the strange thing is that error messages go both into one of my virtual host server's error log with correct data (remote address, server name, etc.), but also go to nginx default (?) error_log with entries that I reported? How come, if the virtual host server being accessed using the slowhttptest program is clearly "testsite" with its own error_log, yet the connection limit error message is reported in two error logs?

slowhttptest -c 1000 -r 1000 -X -u http://testsite

results:

/var/log/nginx/testsite/error_log:

2012/01/12 18:10:34 [error] 10508#0: *15985 limiting connections by zone "addr", client: 217.24.78.177, server: testsite, request: "GET / HTTP/1.1", host: "devel.ahlerstoday.com", referrer: "http://code.google.com/p/slowhttptest/"
2012/01/12 18:10:35 [error] 10508#0: *15989 limiting connections by zone "addr", client: 217.24.78.177, server: testsite, request: "GET / HTTP/1.1", host: "devel.ahlerstoday.com", referrer: "http://code.google.com/p/slowhttptest/"

/var/log/nginx/error_log:

2012/01/12 18:10:34 [error] 10509#0: *12134 limiting connections by zone "addr", client: 127.0.0.1, server: , request: "GET / HTTP/1.0", host: "testsite", referrer: "http://code.google.com/p/slowhttptest/"
2012/01/12 18:10:35 [error] 10509#0: *12136 limiting connections by zone "addr", client: 127.0.0.1, server: , request: "GET / HTTP/1.0", host: "testsite", referrer: "http://code.google.com/p/slowhttptest/"


Could it have anything to do with the fact that limit_zone and limit_conn are defined on http level? Yet, I think the behaviour is not fully correct.

I would appreciate your feedback,

Andrejs
Subject Author Posted

Any way to deal with clients breaking the limit zone

karabaja June 01, 2011 10:52AM

Re: Any way to deal with clients breaking the limit zone

Maxim Dounin June 02, 2011 05:38AM

Re: Any way to deal with clients breaking the limit zone

locojohn January 11, 2012 04:31PM

Re: Any way to deal with clients breaking the limit zone

Maxim Dounin January 12, 2012 11:12AM

Re: Any way to deal with clients breaking the limit zone

locojohn January 13, 2012 01:55AM

Re: Any way to deal with clients breaking the limit zone

locojohn January 13, 2012 01:57AM

Re: Any way to deal with clients breaking the limit zone

Maxim Dounin January 13, 2012 05:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 61
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready