Welcome! Log In Create A New Profile

Advanced

Re: Memory issue

Maxim Dounin
April 06, 2017 11:24AM
Hello!

On Wed, Apr 05, 2017 at 09:32:41PM -0400, JohnCarne wrote:

> We described it properly when opening ticket, I reformulate :
>
> Usually, 1 nginx worker process consumes 1.16-2% of RAM maximum on this
> server, and it remain stable.
> For some days after nginx upgrades, every overnight, during daily stat
> generation process of cpanel which happens on overnight like set, there is
> many nginx reloads due to stat generation (= normal), but this is now
> causing an ever increasing memory use of RAM by nginx worker process,
> usually it stays around 1-2% RAM, we now see it cumulating after stat
> generation process increasing itself at begin with 1-2% RAM each time, which
> will lead after some weaks to a saturated server in term of RAM if nginx is
> not started. When we saw the issue first time, Nginx was consuming 12% of
> server RAM considering we have 128 GB RAM on this shared hosting server.
>
> After recent nginx upgrade :
> The increase is around 0.20% daily, instead of 1-2% RAM

So, you observe one nginx worker process consuming about 12% of
your server RAM, that is, more than 10GB of memory, correct? You
may want to provide something like "ps alx | grep nginx" output
to illustrate the problem.

You may start with the following basic steps:

- Check your "nginx -V" output and nginx configuration; disable
3rd party modules if there are any, and check if the problem
persists. In many cases various obscure problems are introduced
by bugs in 3rd party modules.

- Make sure you are talking about a single worker process memory
consumption, and not overral memory consumption of all nginx
worker processes. Multiple configuration reloads can leave
multiple nginx worker processes in the "shutting down..." state
for a long time which depends on the particular workload, and it
is not a surprise you need memory if you do lots of configuration
reloads.

- Check your nginx configuration to see if there natural reasons
to consume memory - multiple connections and large buffers
configured, thousands of complex location configurtions, large
shared memory zones, and so on.

- Try to find out what exactly causes increased memory
consumption. The "stats generation process" you write about is
not something nginx does by itself, and it is completely unknown
what it means for anyone except you.

If the above won't be enough for you to identify the problem,
consider providing additional information about the observed
proble, including "ps alx" output which demonstrates the problem,
"nginx -V" output, and full nginx configuration (shown with
"nginx -T").

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

Memory issue

JohnCarne March 28, 2017 09:18PM

Re: Memory issue

JohnCarne March 28, 2017 10:18PM

Re: Memory issue

JohnCarne April 01, 2017 08:06AM

Re: Memory issue

JohnCarne April 02, 2017 12:35PM

Re: Memory issue

JohnCarne April 05, 2017 01:02AM

Re: Memory issue

Maxim Dounin April 05, 2017 10:32AM

Re: Memory issue

JohnCarne April 05, 2017 09:32PM

Re: Memory issue

Maxim Dounin April 06, 2017 11:24AM

Re: Memory issue

JohnCarne April 06, 2017 11:32AM

Re: Memory issue

Valentin V. Bartenev April 06, 2017 11:38AM

Re: Memory issue

JohnCarne April 06, 2017 11:39AM

Re: Memory issue

Lucas Rolff April 06, 2017 12:38PM

Re: Memory issue

Maxim Dounin April 06, 2017 01:06PM

Re: Memory issue

JohnCarne April 06, 2017 01:20PM

Re: Memory issue

B.R. via nginx April 06, 2017 03:52PM

Re: Memory issue

JohnCarne April 06, 2017 11:03PM

Re: Memory issue

Aleksandar Lazic April 06, 2017 06:52PM

Re: Memory issue

JohnCarne April 06, 2017 11:34PM

Re: Memory issue

JohnCarne April 06, 2017 11:57PM

Re: Memory issue

JohnCarne April 06, 2017 01:14AM

Re: Memory issue

Aleksandar Lazic April 06, 2017 06:00AM

Re: Memory issue

JohnCarne April 06, 2017 06:01AM

Re: Memory issue

Anoop Alias April 06, 2017 06:14AM



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