Maxim Dounin
July 29, 2017 07:50PM
Hello!

On Wed, Jul 26, 2017 at 06:05:28PM +0200, Vlad K. wrote:

> On 2017-07-26 13:36, Peter Booth wrote:
> > Vlad,
> >
> > I'd suggest beginning by seeing whether or not this is real. If you
> > create a cron job that invokes netstat -ant every hour, then summarize
> > the connections and either view them manually or write them into an
> > influxdb and graph with grafana you will see whether or not the #tcp
> > connections really is growing and, if so, which connections are
> > growing.
>
> Thanks for the suggestion, but with it slow progression and low
> signal-to-noise ration in comparison with the daily and weekly
> connection cycle, I'm not sure it would be practically possible to
> measure it like that. But your suggestion gave me another idea, to
> record IPs of established tcp conns every 5 minutes and then see which
> ones remain constant.
>
> But are you suggesting that nginx status is reporting wrong/fake
> numbers? What do you mean by "real"?
>
> And what about connections that are staying in "CLOSED" state until I
> restart or reload nginx?

Connections in "CLOSED" state are likely leaked sockets. On a
reload nginx should write appropriate alerts to error log, saying
something like "open socket #<fd> left in connection <n>". These
alerts are logged in appropriate connection numbers, and details
of a particular connection can be traced through debug log.

It might not be trivial to debug such socket leaks though, and
before doing anything else it is in general a good idea to:

- make sure you are using latest nginx version, and

- the problem is not in a 3rd party module (that is, you can
reproduce it without 3rd party modules).

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Identifying "Writing" connections in status stub

Vlad K. July 26, 2017 06:16AM

Re: Identifying "Writing" connections in status stub

pbooth July 26, 2017 07:38AM

Re: Identifying "Writing" connections in status stub

Vlad K. July 26, 2017 12:08PM

Re: Identifying "Writing" connections in status stub

Maxim Dounin July 29, 2017 07:50PM

Re: Identifying "Writing" connections in status stub

Vlad K. July 30, 2017 04:12AM

Re: Identifying "Writing" connections in status stub

pbooth July 30, 2017 05:18AM

Re: Identifying "Writing" connections in status stub

pbooth July 30, 2017 05:28AM

Re: Identifying "Writing" connections in status stub

Vlad K. July 30, 2017 06:14AM

Re: Identifying "Writing" connections in status stub

pbooth July 30, 2017 07:32AM

Re: Identifying "Writing" connections in status stub

Vlad K. July 30, 2017 09:34AM

Re: Identifying "Writing" connections in status stub

pbooth July 30, 2017 02:04PM

Re: Identifying "Writing" connections in status stub

Vlad K. July 31, 2017 04:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready