limit_conn is dropping valid connections and causing memory leaks on nginx reload

Francis Daly francis at daoine.org
Sun Oct 1 23:39:49 UTC 2017


On Sat, Sep 30, 2017 at 06:05:15AM -0400, Dejan Grofelnik Pelzel wrote:

Hi there,

I don't have an answer for you.

I don't understand what precisely you are reporting.

It may help others to understand what you are reporting if you can show
a nginx.conf and test case that displays the behaviour that you report.

> We are running the nginx 1.13.5  with HTTP/2 in a proxy_pass proxy_cache
> configuration with clients having relatively long open connections. Our

For example: if you see the failure with http/2 and also with plain
https; and maybe even also with just http; then that means that the
test nginx.conf can be simpler -- remove as much as possible in your
test environment while still demonstrating the problem.

> system does automatic reloads for any new configuration and we recently
> introduced a limit_conn to some of the config files.

I suspect that rapid repeated reloads is not an expected use case
for nginx; but I guess that it should work if you have the resources
available.

> We used the following configuration as recommended by pretty much any
> example:
> limit_conn_zone $binary_remote_addr zone=1234con:10m;
> limit_conn zone1234con 10;

If you can copy-paste a nginx.conf that shows the problem, that should
make it easier for someone else to recreate the test.

The output of "nginx -V" will probably be useful too, in case the problem
cannot easily be seen by someone else using their compiled version.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list