0

Nginx keeps logging below message on my error log

[warn] 16387#16387: *1117 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/1/32/0000000321 while reading upstream, client: 173.245.54.175, server:

this fills up my log files , i want to disable buffering completely ,

i've tried turning proxy_buffering proxy_buffering off; but the logs keeps showing that nginx/fastcgi is buffering responses

How do i turn off buffering all together ?

2
  • Please add output of nginx -T into your question. Oct 17, 2020 at 7:54
  • You can turn it off using the approach in the linked post, but this will dramatically reduce your performance. Rather, you should increase the size of the buffer so that temporary files are written to disk less often. Oct 17, 2020 at 12:07

1 Answer 1

1

i want to disable buffering completely

Technically, you shouldn't be doing it in most of the cases. Buffering is required for things like FastCGI caching, and more importantly, allows asynchronously fetching data from upstream, thus keeping your backend (often heavy on RAM usage), free, while slow clients are fetching data.

Adjust your buffers instead in order to get rid of the warning message, in a way that entire upstream response can be fit into memory.

With proxy buffering truly off, you negate NGINX, and turn it into something that is worse than Apache+PHP-FPM (because everything is synchronous, and further slow, because of NGINX vs PHP-FPM communication)

Not the answer you're looking for? Browse other questions tagged .