|
/
Zope
/
Apsis
/
Pound Mailing List
/
Archive
/
2008
/
2008-04
/
'Request URI is too long.' MaxRequest ignored? MAXBUF too small?
[
regex optimizing? / David L Kensiski ... ]
[
Re: [Pound Mailing List] regex optimizing? / Dave ... ]
'Request URI is too long.' MaxRequest ignored? MAXBUF too small?
Miles Raymond <miles.dev(at)itinternet.net> |
2008-04-16 01:35:23 |
[ FULL ]
|
Hi all,
I've been using the Debian testing package of pound for quite a while now.
Lately I've come across an issue that seems to have been brought up before with
no real answer.
http://www.apsis.ch/pound/pound_list/archive/2007/2007-03/1173859204000#1173859204000
We have been moving over websites from an old group of Windows server to Debian
and I decided after lots of research that pound is the very best http load
balancer.
The problem I came across recently is that one of our scripts takes an
extremely long URI (a small XML file) but it can't pass through pound. After
digging around, I found 'MaxRequest' in the man page which states:
MaxRequest nnn
Request maximal size. All requests will be limited to these many bytes. If a
request contains more data than allowed an error 414 is returned. Default:
unlimited.
So I tried some different values, starting at 4096 and going up, then going
down. That setting seems to be completely ignored. Even though MaxRequest is
supposedly 'unlimited', after doing tests, I found that it is set to '1024',
and the config file is ignored.
I did some more digging on the internet and found a hint about editing a MAXBUF
constant and recompiling to enable longer URIs. I downloaded the source and
started reading and reading. I guess I am confused why there is even a MAXBUF
constant to begin with. Shouldn't the buffer be dynamic? or limited to what
the config file (MaxRequest) says? I also think that I found the part where
MaxRequest /should/ be checked, but isn't (in the get_headers function), with
just the comment:
/* check for request length limit */
logmsg(LOG_WARNING, "(%lx) e414 headers: request URI too long",
pthread_self());
err_reply(cl, h414, lstn->err414);
return NULL;
I really really like pound, but this one problem really kills the viability for
our XML script. Are there reasons why the buffers aren't dynamic? Is
'MaxRequest' a recent wishlist feature that is just in planning?
-Miles Raymond
ITI Internet Services
|
|
|
Re: [Pound Mailing List] 'Request URI is too long.' MaxRequest ignored? MAXBUF too small?
Calomel <poundlist(at)calomel.org> |
2008-04-16 05:31:21 |
[ FULL ]
|
Miles,
The length of the request URL is limited by the MAXBUF parameter in
bytes (default: 1024, can be set to something else at compile time by using
--with-maxbuf=1024). Any URL request longer than MAXBUF will be rejected by
Pound, and never seen on the back-end web server.
The MaxRequest parameter in the config file defines how large the BODY
of a request is (for example, if you upload a file). Requests are allowed
through to the back-end, but the body (contents) are truncated to this
size.
Try rebuilding the source with the argument --with-maxbuf= with 8KB or
however large your URI is going to be. Make sure to do a make clean
_before_ rebuilding.
make clean
./configure --with-maxbuf=8192 --with-ssl=/usr/local/ssl/
make
make install
Hope this helps.
Pound secure reverse proxy "how to"
http://calomel.org/pound.html
--
Calomel (at) http://calomel.org
Open Source Research and Reference
On Tue, Apr 15, 2008 at 04:35:23PM -0700, Miles Raymond wrote:[...]
|
|
|
Re: [Pound Mailing List] 'Request URI is too long.' MaxRequest ignored? MAXBUF too small?
Miles Raymond <miles.dev(at)itinternet.net> |
2008-04-16 20:11:54 |
[ FULL ]
|
Calomel,
Thanks! With your specific instructions, I was able to get a custom pound
working.
How likely is it that MAXBUF will become a config file parameter instead of
compiled in? It still seems excessive to have a static 10k buffer for each
connection when only 12% of the requests are longer than 1k...
Or perhaps to have a static 1k buffer initially and if exceeded, dumped into a
dynamic buffer for that connection. Then the majority of connections would
have no performance impact of dynamic buffers.
-Miles
Calomel wrote:[...][...][...]
|
|
|
|