atom feed47 messages in ru.sysoev.nginxRe: excessive RAM consumption - memor...
FromSent OnAttachments
Todd HGFeb 20, 2008 11:48 am 
eliottFeb 20, 2008 12:15 pm 
Dave CheneyFeb 20, 2008 12:30 pm 
Igor SysoevFeb 20, 2008 12:42 pm 
Todd HGFeb 20, 2008 1:22 pm 
Todd HGFeb 20, 2008 1:31 pm 
Igor SysoevFeb 20, 2008 1:34 pm 
Dave CheneyFeb 20, 2008 1:36 pm 
Igor SysoevFeb 20, 2008 1:40 pm 
Dave CheneyFeb 20, 2008 1:42 pm 
Todd HGFeb 20, 2008 1:57 pm 
Todd HGFeb 20, 2008 1:59 pm 
Todd HGFeb 20, 2008 2:07 pm 
Jodok BatloggFeb 20, 2008 2:09 pm 
Dave CheneyFeb 20, 2008 2:19 pm 
Todd HGFeb 20, 2008 2:20 pm 
Igor SysoevFeb 20, 2008 2:21 pm 
Todd HGFeb 20, 2008 2:23 pm 
Dave CheneyFeb 20, 2008 2:26 pm 
Igor SysoevFeb 20, 2008 2:26 pm 
Todd HGFeb 20, 2008 2:38 pm 
Todd HGFeb 20, 2008 2:41 pm 
Igor SysoevFeb 20, 2008 2:44 pm 
Todd HGFeb 20, 2008 2:47 pm 
Igor SysoevFeb 20, 2008 2:48 pm 
Igor SysoevFeb 20, 2008 2:51 pm 
Dave CheneyFeb 20, 2008 2:54 pm 
eliottFeb 20, 2008 2:56 pm 
Todd HGFeb 20, 2008 4:21 pm 
Todd HGFeb 20, 2008 6:49 pm 
Igor SysoevFeb 20, 2008 11:36 pm 
Igor SysoevFeb 21, 2008 7:22 am 
Todd HGFeb 21, 2008 11:16 am 
Kiril AngovFeb 21, 2008 11:35 am 
Igor SysoevFeb 21, 2008 11:46 am 
Todd HGFeb 21, 2008 1:28 pm 
eliottFeb 21, 2008 1:37 pm 
Todd HGFeb 21, 2008 1:57 pm 
Todd HGFeb 21, 2008 2:16 pm 
eliottFeb 21, 2008 2:37 pm 
Dave CheneyFeb 21, 2008 5:53 pm 
Todd HGFeb 21, 2008 7:02 pm 
Yordan GeorgievFeb 22, 2008 1:35 am 
Todd HGFeb 22, 2008 10:41 am 
Yordan GeorgievFeb 23, 2008 1:19 am 
Todd HGFeb 25, 2008 10:15 pm 
Igor SysoevFeb 25, 2008 10:47 pm 
Subject:Re: excessive RAM consumption - memory leak
From:Kiril Angov (kupo@public.gmane.org)
Date:Feb 21, 2008 11:35:58 am
List:ru.sysoev.nginx

I do not know how you restart nginx but you can send the control process "kill -HUP" and it will do exactly what you want, which is gracefully restart each worker process. You can have a script check for the memory usage and do that when you see it is getting high, or simply do that every 24 hours.

Kiril

On Thu, Feb 21, 2008 at 2:17 PM, Todd HG
<list@public.gmane.org> wrote:

Igor Sysoev wrote:

On Wed, Feb 20, 2008 at 11:47:29PM +0100,

Is there anywhere I could read more about how Nginx uses connection_pool_size, stores connections, if it is in a cache in RAM or hard drive, and what else might be stored in RAM by Nginx?

All that you need is to disable gzipping images. It's enough. Other default settings do not allow workers to grow up.

Of course disabling gzip defeats the purpose of having gzip decrease bandwidth and increase site speed for readers. Right now I only have gzip handling a few million js and css files a day, in addition to tens of millions of images which are not gzipped, but the RAM usage just grows until it is completely consumed. By setting the gzip compression level to 1 the RAM consumption grows more slowly, but eventually eats all the RAM.

It appears what might be needed is a setting to allow the total number of connections for gzip to be set before Nginx automatically kills and restarts a worker. This would be similar to the Apache MaxRequestsPerChild limit setting. There should be a way to set Nginx to kill and restart the worker process to free the RAM, and start again at zero for situations like mine.

Without a solution I need to restart my server about every 24 hours, and this is a very robust server.