Welcome! Log In Create A New Profile

Advanced

Re: Debugging Nginx Memory Spikes on Production Servers

Dmitry Volyntsev
September 21, 2023 02:46AM
On 20.09.2023 20:37, Lance Dockins wrote:
> So I guess my question at the moment is whether endless memory use
> growth being reported by njs.memoryStats.size after file writes is
> some sort of false positive tied to quirks in how memory use is being
> reported or whether this is indicative of a memory leak?  Any insight
> would be appreicated.

Hi Lance,
The reason njs.memoryStats.size keeps growing is because NJS uses arena
memory allocator linked to a current request and a new object
representing memoryStats structure is returned every time
njs.memoryStats is accessed. Currently NJS does not free most of the
internal objects and structures until the current request is destroyed
because it is not intended for a long running code.

Regarding the sudden memory spikes, please share some details about JS
code you are using.
One place to look is to analyze the amount of traffic that goes to NJS
locations and what exactly those location do.
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Debugging Nginx Memory Spikes on Production Servers

Lance Dockins September 20, 2023 12:56PM

Re: Debugging Nginx Memory Spikes on Production Servers

Maxim Dounin September 20, 2023 03:08PM

Re: Debugging Nginx Memory Spikes on Production Servers

Lance Dockins September 20, 2023 11:38PM

Re: Debugging Nginx Memory Spikes on Production Servers

Dmitry Volyntsev September 21, 2023 02:46AM

Re: Debugging Nginx Memory Spikes on Production Servers

Lance Dockins September 21, 2023 09:52AM

Re: Debugging Nginx Memory Spikes on Production Servers

Dmitry Volyntsev September 21, 2023 06:02PM

Re: Debugging Nginx Memory Spikes on Production Servers

Lance Dockins September 21, 2023 07:42PM

Re: Debugging Nginx Memory Spikes on Production Servers

Dmitry Volyntsev September 21, 2023 08:48PM

Re: Debugging Nginx Memory Spikes on Production Servers

Lance Dockins September 22, 2023 09:36AM

Re: Debugging Nginx Memory Spikes on Production Servers

Lance Dockins September 26, 2023 11:32AM

Re: Debugging Nginx Memory Spikes on Production Servers

Dmitry Volyntsev September 26, 2023 06:52PM

Re: Debugging Nginx Memory Spikes on Production Servers

Lance Dockins September 26, 2023 09:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 354
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