limit_conn is not limiting the number of connections in my use case
Valentin V. Bartenev
vbart at nginx.com
Sat Jun 18 22:41:51 UTC 2016
On Saturday 18 June 2016 11:49:16 matt_l wrote:
> I have a hard time understanding limit_conn
> My NGINX has the configuration below. I would expect to see 16 connections
> on the backend server 192.168.10.131 defined in the "dynamic" directive.
> Yet I see ~50-60 connections.
> QPS: 3056
> Active connections: 58
> QPS: 3064
> Active connections: 54
> QPS: 3063
> Active connections: 59
> Please note the QPS (Query Per Second) limiting works well.
> I would greatly appreciate any tip as to what is going on with my use of the
The limit_conn module doesn't limit number of connections to upstream.
It's all about client connections.
Since you have configured "keepalive 32" each worker process can keep open
up to 32 connections to your backend even without client requests.
wbr, Valentin V. Bartenev
More information about the nginx