Welcome! Log In Create A New Profile

Advanced

Re: Files still on disc after inactive time

Maxim Dounin
March 21, 2018 11:42AM
Hello!

On Wed, Mar 21, 2018 at 05:52:20AM -0400, Grzegorz Ćwikliński wrote:

> As you said before killing nginx worker is connected with third party module
> which is Linux kernel Out Of Memory killer.
>
> Because nginx is using too much memory OOM killer score is about 800-900
> point where 1000 is maximum, which is why kernel is killing out nginx
> worker, and after that files in tmp catalog are not deleted and disc is
> full.
>
> About configuration, we are storing 40GB cache because size of files which
> are stored is about 700MB to 1GB and stored for 1d. Our machines have 24GB
> and at some time nginx uses 22GB-23GB, and after that OOM killer start and
> kill our worker.

Ok, so the behaviour observed with cache files not being removed
is an expected result of the OOM killer activity. No need to
investigate it any further. Instead, let's focus on what causes
the problem - RAM usage.

> My question is why nginx is using so much RAM, and how to prevent nginx from
> using so much RAM. Or other possibilities to stop killing nginx worker.

Amount of RAM nginx can use depends on the configuration and a
particular workload. As per the only configuration snippet given
in this thread, nginx is expected to use at least 4G of shared
memory for cache keys zone.

In typical configurations, most of RAM is spent on various
per-connection buffers - including client_header_buffer,
large_client_header_buffers, proxy_buffers, proxy_buffer_size,
output_buffers, and so on. Even with relatively small defaults
these can be a lot if there are thousands of connections.

What exactly happens in your case requires detailed investigation,
and unlikely it is something that can be done at least without
such basic things as "nginx -V" output and full nginx configuration.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Files still on disc after inactive time

Andrzej Walas February 15, 2018 04:33AM

Re: Files still on disc after inactive time

Maxim Dounin February 15, 2018 08:40AM

Re: Files still on disc after inactive time

Andrzej Walas February 15, 2018 08:48AM

Re: Files still on disc after inactive time

Maxim Dounin February 15, 2018 09:40AM

Re: Files still on disc after inactive time

Andrzej Walas February 16, 2018 03:16AM

Re: Files still on disc after inactive time

pbooth February 16, 2018 04:28AM

Re: Files still on disc after inactive time

Andrzej Walas February 16, 2018 04:39AM

Re: Files still on disc after inactive time

Richard Stanway via nginx February 16, 2018 05:38AM

Re: Files still on disc after inactive time

Andrzej Walas February 16, 2018 06:15AM

Re: Files still on disc after inactive time

Maxim Dounin February 16, 2018 06:46AM

Re: Files still on disc after inactive time

Andrzej Walas February 19, 2018 04:38AM

Re: Files still on disc after inactive time

Maxim Dounin February 19, 2018 07:46AM

Re: Files still on disc after inactive time

Andrzej Walas February 26, 2018 03:32AM

Re: Files still on disc after inactive time

Andrzej Walas February 28, 2018 05:22AM

Re: Files still on disc after inactive time

Maxim Dounin February 28, 2018 08:44AM

Re: Files still on disc after inactive time

Grzegorz Ćwikliński March 21, 2018 05:52AM

Re: Files still on disc after inactive time

Maxim Dounin March 21, 2018 11:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready