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 ?
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.