Continuing issues with limit_conn

Stuart McKim mckim at
Tue Apr 29 22:50:52 MSD 2008

On Tue, Apr 29, 2008 at 11:57:44AM +0400, Maxim Dounin wrote:
> It looks like there is some misunderstanding regarding to what limit_conn 
> actually limits.  It limits concurrent connections *processed* by nginx 
> (not keep-alive ones), and only after header has been received (and thus 
> configuration for request has been
> determined).
> Since nginx is event-based, with one worker process you shouldn't expect 
> requests to hit limit_conn unless they block at some stage (i.e. responses 
> bigger than socket buffers if sendfile off, replies bigger than 
> sendfile_max_chunk if sendfile on, proxy_pass ...).  With many workers 
> limit_conn may be hit without blocking, but this generally requires _very_ 
> high concurrency for small requests.
> Maxim Dounin


Thanks for the clarification. I ran another test, using a large test
file and multiple workers and saw that nearly all the requests received
a 503 response.

This makes sense; I wasn't taking into account the way I was running the


Stuart McKim
FTP Administrator
Open Source Lab
Oregon State University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the nginx mailing list