Unnecessary Log Entry?

2023-09-20 Thread Lance Dockins
Is there a reason that Nginx continuously logs the sort of message below in the info log when client_body_in_file_only is set to either "clean" or "on"? Regardless of which of those two settings you're using for that directive, the request body is always going to be buffered to a temporary file (t

Debugging Nginx Memory Spikes on Production Servers

2023-09-20 Thread Lance Dockins
Are there any best practices or processes for debugging sudden memory spikes in Nginx on production servers? We have a few very high-traffic servers that are encountering events where the Nginx process memory suddenly spikes from around 300mb to 12gb of memory before being shut down by an out-of-m

Re: Debugging Nginx Memory Spikes on Production Servers

2023-09-20 Thread Manuel
Hello, apparently you could look into dmesg. There should be a stacktrace of the process. Also you could somehow start nginx with gdb. You could also log all request and then when the server crashed try to replay them to be confident that the crash is reproducible. What does ChatGpt says? 😅

Re: Unnecessary Log Entry?

2023-09-20 Thread Maxim Dounin
Hello! On Wed, Sep 20, 2023 at 11:47:48AM -0500, Lance Dockins wrote: > Is there a reason that Nginx continuously logs the sort of message below in > the info log when client_body_in_file_only is set to either "clean" or > "on"? Regardless of which of those two settings you're using for that > d

Re: Debugging Nginx Memory Spikes on Production Servers

2023-09-20 Thread Maxim Dounin
Hello! On Wed, Sep 20, 2023 at 11:55:39AM -0500, Lance Dockins wrote: > Are there any best practices or processes for debugging sudden memory > spikes in Nginx on production servers? We have a few very high-traffic > servers that are encountering events where the Nginx process memory > suddenly

Re: Debugging Nginx Memory Spikes on Production Servers

2023-09-20 Thread Lance Dockins
Thank you, Maxim. I’ve been doing some testing since I reached out earlier and I’m not sure whether I’m looking at a memory leak in Nginx/NJS or whether I’m looking at some sort of quirk in how memory stats are being reported by Nginx. All that I know is that my testing looks like a memory leak

Re: Unnecessary Log Entry?

2023-09-20 Thread Lance Dockins
Thank you. Normally I don’t even use the info logs but while troubleshooting a memory problem, I was looking through them and noticed that even just using an error_log file at the info level was writing a ton of data despite that config. I guess I can just shut the info log back off. — Lance Do

Re: Debugging Nginx Memory Spikes on Production Servers

2023-09-20 Thread Dmitry Volyntsev
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 memo