6 messages in ru.sysoev.nginxRe: Continuing issues with limit_conn
FromSent OnAttachments
Stuart McKimApr 28, 2008 6:09 pm 
CalomelApr 28, 2008 8:28 pm 
Maxim DouninApr 29, 2008 12:57 am 
CalomelApr 29, 2008 8:40 am 
Stuart McKimApr 29, 2008 11:50 am 
Maxim DouninApr 30, 2008 4:16 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Continuing issues with limit_connActions...
From:Stuart McKim (mcki@public.gmane.org)
Date:Apr 29, 2008 11:50:29 am
List:ru.sysoev.nginx

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,

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 test.

Thanks, Stuart