Memory usage doubles on reload

Maxim Dounin mdounin at
Thu Mar 6 03:48:35 UTC 2014


On Wed, Mar 05, 2014 at 05:47:47PM -0500, PetrHolik wrote:

> Hello we are running nginx 1.2.7 with this in conf:
>   output_buffers 5 5m;
>   sendfile off;
> That works well, BUT if I reload server configuration with nginx -s reload
> Memory consumptions for few hours(clients use long lived(few hours) tcp
> connections). Is this behavior correct? Can we avoid this? We have to had as
> twice much RAM to be able to restart nginx under load.

On configuration reload nginx spawns new worker processes, and 
gracefully shuts down old worker processes (and gracefull shutdown 
may take a while, especially if there are long-lived requests).  
That is, behaviour you observe is expected.

Some more details can be found here:

Maxim Dounin

More information about the nginx mailing list