excessive RAM consumption - memory leak

Igor Sysoev is at rambler-co.ru
Thu Feb 21 01:22:08 MSK 2008


On Wed, Feb 20, 2008 at 10:59:54PM +0100, Todd HG wrote:

> Igor Sysoev wrote:
> > On Wed, Feb 20, 2008 at 10:22:52PM +0100, Todd HG wrote:
> > 
> >> 
> >> /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
> >> 9328  9327  8.8 11192 - nginx: worker process
> >> 9329  9327  8.7 13200 - nginx: worker process
> >> 23660 23641  0.0  5136 pipe_w egrep (nginx|PID)
> >> 
> >> I also have configured:
> >> 
> >>     client_header_timeout  3m;
> >>     client_body_timeout    3m;
> >>     send_timeout           3m;
> > 
> > What gzip settings do you use ?
> 
>     gzip on;
>     gzip_min_length  1100;
>     gzip_buffers     4 8k;
>     gzip_types       image/jpg image/jpeg image/gif image/png text/plain 
> text/xml application/xhtml+xml text/css application/xml image/svg+xml 
> application/rss+xml application/atom_xml application/x-javascript 
> application/x-httpd-php application/x-httpd-fastphp 
> application/x-httpd-eruby text/html;
>     gzip_comp_level 9;

This is cause of memory and CPU consumption. You do not need to compress
already compressed jpegs/etc. If you serve images only, you should turn
gzip off at all (it's default).

As to other MIME types:

1) there are no such types as
   application/x-httpd-php
   application/x-httpd-fastphp
   application/x-httpd-eruby
they probably exist as internal MIME-types inside Apache, but they are
never showed to a client.

2) the following types as
   application/xhtml+xml
   application/rss+xml
   application/atom_xml

probably do not exist too.

Keep the list as small as possible, because nginx iterates it sequenctally.


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





More information about the nginx mailing list