excessive RAM consumption - memory leak

Igor Sysoev is at rambler-co.ru
Thu Feb 21 10:36:58 MSK 2008


On Thu, Feb 21, 2008 at 01:22:10AM +0100, Todd HG wrote:

> Igor Sysoev wrote:
> > On Wed, Feb 20, 2008 at 11:47:29PM +0100, Todd HG wrote:
> > 
> 
> I've set the cache to:
> 
>     expires       1M;
>     add_header    Cache-Control  public;

You may omit "add_header    Cache-Control  public" at all.

> I've also added the following to the config:
> 
>    connection_pool_size 256;
>    client_header_buffer_size 1k;
>    large_client_header_buffers  4 4k;
>    request_pool_size 4k;
>    output_buffers       4 32k;
>    postpone_output 1460;
> 
>    ignore_invalid_headers on;
> 
> It appears the:
> 
> connection_pool_size 256;
> 
> ... caused a big drop in my RAM usage.

This is default setting.

> Without this set, does the server just keep pooling connections?

The connection_pool_size set initial size of memory pool per connection.
If a connection needs more memory nginx allocates it by chunk of this size.

You may omit and use default values of

connection_pool_size
client_header_buffer_size
large_client_header_buffers
request_pool_size
output_buffers
postpone_output
ignore_invalid_headers


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list