You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Graham Leggett <mi...@sharp.fm> on 2008/10/15 12:42:20 UTC
ProxyIOBufferSize less than greater than
Hi all,
I was asked to clarify the case with the ProxyIOBufferSize, where the
documentation and the code don't agree.
According to mod_proxy.c, the effective size of the buffer is the
greater of AP_IOBUFSIZE or the user specified value:
psf->io_buffer_size = ((s > AP_IOBUFSIZE) ? s : AP_IOBUFSIZE);
In other words, the effective buffer size is greater than or equal to 8192.
According to the docs at
http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxyiobuffersize,
the default value is "ProxyIOBufferSize 8192", which so far is correct.
The docs then say "The size must be less or equal 65536".
There doesn't seem to be anything clearly visible in the code that
enforces this "less than or equal to 65536", but there is code in there
that enforces "greater than or equal to 8192".
So which is correct, the server or the docs?
Regards,
Graham
--
Re: ProxyIOBufferSize less than greater than
Posted by Mladen Turk <mt...@apache.org>.
Graham Leggett wrote:
> Mladen Turk wrote:
>
>> Nope, it'll silently ALIGN(ProxyIoBufferSize, 1024)
>> from 8K to 64K regardless of ProxyIoBufferSize provided
>
> So would it be accurate to say "if AJP is used, the ProxyIOBufferSize is
> set to 64k, and the value for ProxyIOBufferSize is ignored"?
>
Nope.
If AJP is used the ProxyIOBufferSize is aligned to the closest
1024 byte value. Any value bellow 8192 is set to 8192 bytes,
and any value beyond 65536 is set to 65536.
Regards
--
^(TM)
Re: ProxyIOBufferSize less than greater than
Posted by Graham Leggett <mi...@sharp.fm>.
Mladen Turk wrote:
> Nope, it'll silently ALIGN(ProxyIoBufferSize, 1024)
> from 8K to 64K regardless of ProxyIoBufferSize provided
So would it be accurate to say "if AJP is used, the ProxyIOBufferSize is
set to 64k, and the value for ProxyIOBufferSize is ignored"?
Regards,
Graham
--
Re: ProxyIOBufferSize less than greater than
Posted by Mladen Turk <mt...@apache.org>.
Graham Leggett wrote:
> jean-frederic clere wrote:
>
>>> Where is the 64k limit enforced? in mod_proxy_ajp?
>>
>> By the AJP protocol.
>
> What I meant was, what the can the user expect to happen if they choose
> a limit greater than 64k? There is no enforcement of range in the
> set_io_buffer_size() function apart from the lower limit of 8192.
>
> Will the AJP module give an error message of some kind?
>
Nope, it'll silently ALIGN(ProxyIoBufferSize, 1024)
from 8K to 64K regardless of ProxyIoBufferSize provided
> Ideally this should be documented.
>
Yes.
Regards
--
^(TM)
Re: ProxyIOBufferSize less than greater than
Posted by Graham Leggett <mi...@sharp.fm>.
jean-frederic clere wrote:
>> Where is the 64k limit enforced? in mod_proxy_ajp?
>
> By the AJP protocol.
What I meant was, what the can the user expect to happen if they choose
a limit greater than 64k? There is no enforcement of range in the
set_io_buffer_size() function apart from the lower limit of 8192.
Will the AJP module give an error message of some kind?
Ideally this should be documented.
Regards,
Graham
--
Re: ProxyIOBufferSize less than greater than
Posted by jean-frederic clere <jf...@gmail.com>.
Graham Leggett wrote:
> Mladen Turk wrote:
>
>> None ;)
>>
>> 64K comes from its usage for max AJP packet size.
>> 8K is minimum/default AJP packet size. However, larger then 64K sizes
>> are probably usable for setting non-ajp buffer sizes
>> (think this is propagated down to the socket layer)
>>
>> So, in any way the docs should be updated cause its limits
>> depends weather used for ajp or non-ajp protocol.
>
> Where is the 64k limit enforced? in mod_proxy_ajp?
By the AJP protocol.
Cheers
Jean-Frederic
Re: ProxyIOBufferSize less than greater than
Posted by Graham Leggett <mi...@sharp.fm>.
Mladen Turk wrote:
> None ;)
>
> 64K comes from its usage for max AJP packet size.
> 8K is minimum/default AJP packet size. However, larger then 64K sizes
> are probably usable for setting non-ajp buffer sizes
> (think this is propagated down to the socket layer)
>
> So, in any way the docs should be updated cause its limits
> depends weather used for ajp or non-ajp protocol.
Where is the 64k limit enforced? in mod_proxy_ajp? If so, in theory the
docs just need to be clarified to say "must be greater than 8192, but
less than 65536 (if using ajp)".
Regards,
Graham
--
Re: ProxyIOBufferSize less than greater than
Posted by Mladen Turk <mt...@apache.org>.
Graham Leggett wrote:
> Hi all,
>
>
> According to the docs at
> http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxyiobuffersize,
> the default value is "ProxyIOBufferSize 8192", which so far is correct.
>
> The docs then say "The size must be less or equal 65536".
>
> There doesn't seem to be anything clearly visible in the code that
> enforces this "less than or equal to 65536", but there is code in there
> that enforces "greater than or equal to 8192".
>
> So which is correct, the server or the docs?
>
None ;)
64K comes from its usage for max AJP packet size.
8K is minimum/default AJP packet size. However, larger then 64K sizes
are probably usable for setting non-ajp buffer sizes
(think this is propagated down to the socket layer)
So, in any way the docs should be updated cause its limits
depends weather used for ajp or non-ajp protocol.
Regards
--
^(TM)