Hi,
What is the relationship between these three directives -
proxy_busy_buffers_size, proxy_buffers and proxy_buffer_size?
Currently, I'm only using proxy_buffer_size in my location block but
whenever I set it to some higher number, for ex: 32k, it throws the
following error -
nginx: [emerg] "proxy_busy_buffers_size" must be less than the size of all
"proxy_buffers" minus one buffer
Thanks in advance!
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,294892,294892#msg-294892
On Tue, Aug 02, 2022 at 11:01:32AM -0400, libresco_27 wrote:
Hi there,
> What is the relationship between these three directives -
> proxy_busy_buffers_size, proxy_buffers and proxy_buffer_size?
http://nginx.org/r/proxy_buffer_size, plus some of the following sections.
> Currently, I'm only using proxy_buffer_size in my location block but
> whenever I set it to some higher number, for ex: 32k, it throws the
> following error -
> nginx: [emerg] "proxy_busy_buffers_size" must be less than the size of all
> "proxy_buffers" minus one buffer
If you have told nginx to use 20 kB of buffers; then also telling nginx
that it can have up to 40 kB of those buffers busy sending, is unlikely
to be a correct config.
I suspect that the error message is to ensure that you do not think that
you have configured more buffers than you actually have.
Cheers,
f
--
Francis Daly francis at daoine.org
But I'm not explicitly defining the value for proxy_busy_buffers_size to
something. Right now it is set with the default value
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,294892,294904#msg-294904
On Wed, Aug 03, 2022 at 08:49:20AM -0400, libresco_27 wrote:
Hi there,
> But I'm not explicitly defining the value for proxy_busy_buffers_size to
> something. Right now it is set with the default value
Oh, sorry. I had misunderstood what you were reporting.
I now think that the confusion comes from what "the default value"
for proxy_busy_buffers_size is.
The documentation has one set of words, which is correct once you know
how it is intended to be interpreted.
If we can find a set of words that is both correct and clear, we can
probably get the documentation changed to help the next person.
I think that the key is: if not explicitly defined, the value for
proxy_busy_buffers_size is "the bigger of: twice proxy_buffer_size;
and the size of two proxy_buffers".
By default-default, that is the 8k or 16k that the documentation summary
shows.
But when you set a big proxy_buffer_size value, you are implicitly
increasing proxy_busy_buffers_size as well.
And then the other requirement kicks in -- proxy_busy_buffers_size must
be not bigger than "proxy_buffers number-minus-one times size".
Also, if you want to explicitly set proxy_busy_buffers_size, you cannot
make it be smaller than a single proxy_buffers, or than proxy_buffer_size.
So with all default values on a 4k page system, proxy_buffers is "8
4k" (32k total, and 28k is the maximum for proxy_busy_buffers_size);
proxy_buffer_size is 4k; and proxy_busy_buffers_size is 8k.
If you want to set proxy_buffer_size to more than 14k, you must either
also increase proxy_buffers (in number or size); or explicitly set
proxy_busy_buffers_size to 28k or lower (while not being smaller than
proxy_buffer_size).
Hopefully this does not make things more confusing...
Cheers,
f
--
Francis Daly francis at daoine.org