Nginx warning : a client request body is buffered to a temporary file

Hi,

We see this warning a lot in Nginx logs :
[warn] … a client request body is buffered to a temporary file /tmp/nginx/client-body/…

I have done some testing, this log appears for POST requests made to our NestJS APIs. I’ve tried different request body sizes, this log doesn’t appear for a 2ko body, but with a 4ko or more it appears every time.

Is this a problem ? Do we have to make adjustments in the service advanced settings or can we forget this warning ?

Thank you for your advice.

Qovery console : https://console.qovery.com/organization/55ee45eb-b3e8-4cdb-8479-9ffa2899b6d2/project/d0575a39-0386-4ec8-8f91-8d1c132c6f3d/environment/3c23caad-908b-4ba4-9d7b-6ae7b88b037f/services/general

Hi @Mathieu_Haage,

Usually it’s not an issue, but depending on your use case.
1- if your app sometimes has payload larger than the buffer size, it will from time to time write on disk but the positive point being it will use less memory all the time
2- if you app receive a lot of requests with larger payload, then it will definitively helps to increase this buffer size to get a perf hit

As you spotted, we set in by default to 4ko but it’s customizable via service advanced settings, here’s the doc.

Hope it helps,
Cheers

Thank you very much, now it’s much clearer for me. I started to understand the problem but I was not sure if it was a good idea to tune this value.

There are going to be a lot of requests with large payloads, so I’m going to increase this value according to the size of the body.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.