Welcome! Log In Create A New Profile


Re: High memory usage

October 27, 2019 01:42PM
Few things...

brotli_comp_level should probably be something like 5, setting to 9
would be rather CPU intensive (much more than gzip 9).

Some of your proxy buffer settings seem rather excessive... Something
like this would probably be sufficient unless you have some *really*
large files coming from upstream.

proxy_buffer_size 8k;
proxy_busy_buffers_size 16k;
proxy_buffers 64 4k

A good read for proxy settings that I've found is:

You should set your SSL settings at the 'http' level, including
default certificates. Then in each 'server' directive you can
re-define the certificates when necessary.

You can also set all the common proxy_set_header vars at the 'http'
level instead of duplicating for each server. Maybe also look into
using a common upstream zone instead of always defining the proxy.

Finally, just because I would check your PHP-FPM settings (not in
nginx)... Make sure that at the very least:

pm = ondemand
pm.max_request = 1000

I've seen at times where not setting a max_request leads to eating up
ram in Apache, could possibly be an issue with Nginx.

Nothing else really stands out. I would just try to decrease buffers
where you can, especially those that are created for each server
instance. With all the vhosts you have that can really add up quickly.

nginx mailing list
Subject Author Posted

high memory usage

Anoop Alias October 25, 2018 10:36AM

Re: High memory usage

J.R. October 23, 2019 12:38PM

Re: High memory usage

bvek1 October 24, 2019 05:30AM

Re: High memory usage

J.R. October 27, 2019 01:42PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 111
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready