Nginx Active & Writing Connections exponential growth.

Maxim Dounin mdounin at
Sat Jul 31 01:30:27 MSD 2010


On Thu, Jul 29, 2010 at 02:10:23PM +0200, Antonio Jerez Guillén wrote:

> Hi there!
> First of all, I am a new user of the nginx mailing list so there is a short
> introduction of myself. My name is Antonio, and I have been working for a
> long time as Web Operations Engineer at, and
> other minor projects.
> We are running nginx in for static content, without problems,
> and in, since 2 years ago, for static and dynamic content
> without problems . But it is in visualizeUs where we are having some
> problems, since we updated nginx to nginx/0.7.67, under debian Lenny 32 bits
> (aws medium instance), with php-fcgi
> There is the munin output for nginx connections.

1. Are you sure you are measuring connections here?  Numbers looks 
odd, one can't have 280.57 active connections (which is shown on 
the first graph as "max"), it should be integer.

2. Are these connections correspond to real client and/or backend 
connections (i.e. compare with netstat data)?  Most likely no, but 
numbers are suspiciously low.

3. What does nginx -V show?  Do you have any third party modules / 
patches?  If yes - are you able to reproduce the problem without 

4. Are you able to reproduce the problem with 0.8.*?

> We noticed, an exponential growth for connections, better apreciated through
> the graphic.

Looks like linear one, not exponential, but anyway it looks like 
socket leak.

I don't remember any socket leaks relevant to 0.7.* branch which 
aren't fixed in 0.7.67.  But things changed a lot in 0.8.* branch 
and this particular problem may not even appear with new code.

> There is our nginx configuration:

This doesn't contain full nginx config so it's mostly useless.


> As active connections grow, response time sligthly increases, so a nginx
> reboot is needed to get back to optimal response time.Nginx reboots are
> apreciated in munin graphic when it returns to normal values, in other case,
> exponential grows continues.

Could you please clarify what do you mean by "slightly increases"?  
With epoll extra 1k idle connections shouldn't be noticeable.

Maxim Dounin

More information about the nginx mailing list