Welcome! Log In Create A New Profile

Advanced

Re: Limit_zone and limit_conn problem.

Maxim Dounin
January 22, 2010 03:58PM
Hello!

On Fri, Jan 22, 2010 at 08:56:53PM +0100, Piotr Karbowski wrote:

> Hi list, I have smillar problem like
> http://markmail.org/message/m5mau3i4yxkw46rj [ Problems using
> limit_zone and limit_conn ]

This is believed to be what's called "insufficient testing" and
just doesn't trigger 503 because it's hard to trigger unless you
are downloading big response which fills all the socket buffers
or nginx is waiting for a backend during processing of a request.

> How this limit_conn work? I have limit_conn one 1; but still I can
> do many connections and download without 503 error or something.

limit_conn do something like this:

1. On request processing start (once all headers have been read)
it checks if limit_zone has number recorded for the variable in
question, and if it's bigger than allowed - returns 503. if it's
still bellow allowed maximum - increments number (or stores 1 if
there were nothing recorded so far).

2. On request completion (when we are done sending data to client
and connection is about to be closed or goes into keepalive state)
number in question is decremented.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Limit_zone and limit_conn problem.

Piotr Karbowski January 22, 2010 03:00PM

Re: Limit_zone and limit_conn problem.

Maxim Dounin January 22, 2010 03:58PM

Re: Limit_zone and limit_conn problem.

Piotr Karbowski January 23, 2010 02:56AM

Re: Limit_zone and limit_conn problem.

Maxim Dounin January 23, 2010 01:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 83
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready