limit issue, i think it's a bug

Maxim Dounin mdounin at
Sat Nov 26 20:28:31 UTC 2011


On Sat, Nov 26, 2011 at 07:22:51AM -0500, talisto wrote:

> Maxim Dounin Wrote:
> > How do you test it?
> I've been testing it with Siege, but I can actually generate error 503
> responses just by refreshing my web browser fast enough.  My results
> with Siege are somewhat random; sometimes the very first request fails,
> then a couple will pass, then another will fail, all within a couple
> seconds.  That's with my rate set to 15r/s, which should be more than
> enough.. in Siege I'm only using 5 concurrent users with 1 request per
> second, yet it still fails, often on the first or second hit.  In my
> browser, it's a bit more reliable;  I have a simple page which makes 2
> ajax requests; the 2nd ajax request will always fail.
> As soon as I remove the limit_req line, I can flood my server with as
> many requests as Siege can handle and it never generates a 503, so I
> know that the errors aren't being caused by something else.  I'm not
> sure why the limit_req isn't working properly though.

The limit_req is expected to generate 503 as soon it sees more 
requests than burst set.  As you have no burst set, it will 
generate 503 as soon as it sees requests coming with less than 
1/15 second interval.  This is expected behaviour.

While flooding your your server with requests (with limit_req 
set), you should see about 15 successfull requests per second, 
others will return 503.

Maxim Dounin

More information about the nginx mailing list