#buffers
client buffers
client_body_buffer_size 128k;
client_max_body_size 100m;
client_header_buffer_size 32k;
large_client_header_buffers 16 256k;
output_buffers 1 32k;
postpone_output 1460;
#Porxy buffers
proxy_buffer_size 32k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
proxy_max_temp_file_size 2048m;
proxy_temp_file_write_size 2048m;
## fastcgi buffers
fastcgi_buffers 16 64k;
fastcgi_buffer_size 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
Default:
fastcgi_max_temp_file_size 1024m;
fastcgi_buffer_size size
Syntax: fastcgi_buffer_size size;
Default:
fastcgi_buffer_size 4k|8k;
Sets the size of the buffer used for reading the first part of the response received from the FastCGI server. By default, the buffer size is equal to one memory page. This is either 4K or 8K, depending on a platform.
fastcgi_buffers
Syntax: fastcgi_buffers number size;
Default:
fastcgi_buffers 8 4k|8k;
Sets the number and size of the buffers used for reading a response from the FastCGI server, for a single connection.
8*8=16K
fastcgi_busy_buffers_size size;
Syntax: fastcgi_busy_buffers_size size;
Default:
fastcgi_busy_buffers_size 8k|16k;
buffering part of the response to a temporary file. By default, size is limited by the size of two buffers set by the fastcgi_buffer_size and fastcgi_buffers directives.
nginx fastcgi module variables
upstrem respone Buffered to temporary files
What is an upstream response is buffered to a temporary file warning?
The warning message indicates that the response was buffered to disk because it doesn’t fit into configured memory buffers. You can adjust buffers to fit complete upstream response. If the maximum possible response size is unknown, we recommend to increase both parameters by factor of two until warnings stop appearing
You should set proxy_max_temp_file_size to 0 in order to remove it
nginx maxium upstream buffersize
fastcgi buffers limit
check memory page size linux
root@instance-1:~# getconf PAGESIZE
4096
Since the page size of the virtual address space is architecture dependent, we may get a different result on a different system
References
https://gist.github.com/ikennaokpala/5792a71cfae6818035eedc8abd9ae7b4
https://www.getpagespeed.com/server-setup/nginx/tuning-proxy_buffer_size-in-nginx