proxy_buffer_size values are honored even if proxy_buffering is off

Maxim Dounin mdounin at
Fri May 9 01:25:34 UTC 2014


On Mon, May 05, 2014 at 03:04:22AM +0800, Rv Rv wrote:

> At the, the documentation implies that 
> the configuration proxy_buffer_size , proxy_buffers and proxy_busy_buffers will be honored only when proxy_buffering is turned on.

The "proxy_buffering off" implies that response will not be 
buffered - that is, everything received from a backend is 
immediately sent to a client.

At least one buffer is still required though (nginx have to store 
data from a backend somewhere before it will be able to send them 
to a client), and proxy_buffer_size defines size of this buffer.

See for details.

> I had been seeing truncated responses of files which went away 
> when I increased proxy_buffer_size even though proxy_buffering 
> was turned off. I am running nginx1.5.8. Is this expected 
> behavior ?

No, it's not.

First of all, I would recommend you to take a look into error
logs - it might have an answer.

If it doesn't help, some more debugging hints can be found at

Maxim Dounin

More information about the nginx mailing list