limit_conn_zone and limit_conn behavior in 1.2.8
nginx-forum at nginx.us
Fri Apr 12 20:44:34 UTC 2013
In my config, within http section, I have:
limit_conn_zone $binary_remote_addr zone=addr:10m;
limit_conn addr 3;
which I interpret as, setting a memory zone of size 10 megabytes for keeping
states of connected IPs and restricting 3 concurrent connections per IP at a
time. If the size of the zone is exhausted or the limit per IP is breached,
Nginx will return 503 as response.
I have them before upgrading to 1.2.8. During testing today, I found several
503 responses due to these settings, for example:
'2013/04/12 15:38:48 [error] 5888#0: *352 limiting connections by zone
"addr", client: 127.0.0.1, server: static.mysite.com, request: "GET
/js/jquery.reject.min.js HTTP/1.1", host: "static.mysite.com", referrer:
The client IP is 127.0.0.1 here because Nginx is behind a HAproxy.
The test I did was launching several requests which requests for delivery of
number of them failed with 503s. The same test I did before with Nginx 1.2.7
did not result any 503 responses. Any idea what might have caused this? Is
it because the HAProxy in front of Nginx? Thanks!
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238331,238331#msg-238331
More information about the nginx