Disable upstream response buffering nginx [duplicate]
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 ?
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)