Nginx waiting connections growing

Bruno Prémont bruno.premont at restena.lu
Wed Sep 16 13:33:13 UTC 2015


Hello Maxim,

Seeing the same issue here, running nginx-1.8 (compiled for i586,
against openssl-1.0.1p).

Some workers do complain shortly after the daily SIGHUP to reload
configuration and rotate logs:
2015/09/02 10:07:14 [notice] 18162#0: exiting
2015/09/02 10:07:14 [alert] 18162#0: *1471655 open socket #147 left in connection 40
2015/09/02 10:07:14 [alert] 18162#0: *1485419 open socket #224 left in connection 44
2015/09/02 10:07:14 [alert] 18162#0: *1548715 open socket #212 left in connection 84
2015/09/02 10:07:14 [alert] 18162#0: *1685585 open socket #61 left in connection 164
2015/09/02 10:07:14 [alert] 18162#0: *1462853 open socket #290 left in connection 202
2015/09/02 10:07:14 [alert] 18162#0: *1687835 open socket #76 left in connection 231
2015/09/02 10:07:14 [alert] 18162#0: *1684533 open socket #62 left in connection 237
2015/09/02 10:07:14 [alert] 18162#0: *1647090 open socket #32 left in connection 255
2015/09/02 10:07:14 [alert] 18162#0: *1598817 open socket #209 left in connection 281
2015/09/02 10:07:14 [alert] 18162#0: *1686652 open socket #166 left in connection 283
2015/09/02 10:07:14 [alert] 18162#0: aborting

Of the two nginx frontend servers, only the one with mostly SSL
traffic is visibly affected (same binary on both servers).


I've not seen the issue with 1.7.x releases of nginx (only external
module in use is headers_more).


Bruno



On Wed, 16 Sep 2015 15:49:58 +0300 Maxim Dounin wrote:
> Hello!
> 
> On Wed, Sep 16, 2015 at 06:09:24AM -0400, kamalakarv wrote:
> 
> > I have one more question
> > 
> > 24360 ?        Ss     0:00 nginx: master process /etc/nginx/sbin/nginx
> > 10479 ?        S      0:06  \_ nginx: worker process
> > 
> >  >  ls -l /proc/10479/fd | wc -l  
> >     95 
> > 
> > Active connections: 551
> > server accepts handled requests
> > 69542 69542 79078
> > Reading: 0 Writing: 2 Waiting: 524
> > 
> > -- As per my understanding if there are 551 active connections means there
> > should be same amount of fd ( file descriptors)  should be opened  right? 
> > but in my case it is just  95 ?
> 
> It looks like nginx worker process died for some reason.  Try 
> looking into logs, it should have something like "[alert] worker 
> process ... exited on signal ...".  
> 
> Some very basic things to check are:
> 
> - if you are seeing the problem without 3rd party modules;
> 
> - if you are seeing the problem with recent nginx versions.
> 
> Some more debugging hints can be found at:
> 
> http://wiki.nginx.org/Debugging
> 



More information about the nginx mailing list