[Rabbit-dev] Request-URI Too Long

Robert Olofsson robert.olofsson at khelekore.org
Mon Jan 3 19:13:19 CET 2011


On Mon, 3 Jan 2011 13:52:35 +0000
Mindaugas Žakšauskas <mindas at gmail.com> wrote:

> I have seen this error/exception in the error logs more and more
> frequently on some well-known sites (eBay, Facebook, possibly others).

Ok, that sounds odd.

> The GET request itself which causes this is less than 800
> bytes/characters. I have tried to reproduce this by following the same
> URL but it returned HTTP 200 OK so I assume this only works in
> combination with other headers. Unfortunately I don't have original
> headers logged.

I had some bug reports about it for very long cookies some time ago. 
I did fix that problem so now the default buffer is 4kB, but grows to 
128 kB if 4kB does not work.

Seeing network data would be great, but I guess it can be hard to get it.

> This error seems to be coming from HttpHeaderReader:144. I can see a
> TODO around here, but not quite sure if this is a placeholder for a
> better implementation or just a corner case which is not clear how to
> handle properly.

Ops, guess I forgot to remove that TODO when I actually made the 
buffer grow.
 
> Is there any quick workaround how to fix this? For example, I would
> more than happy to have larger buffer allocated as per configuration
> setting (similar to http://forum.nginx.org/read.php?11,9470,9514) but
> it seems that this is hard coded to 4096 in the Rabbit code.

Currently it is hard coded, so no config option exists.

> I would even be willing to recompile Rabbit myself using larger buffer, but:
> 1) would it solve the problem?

Probably not, since rabbit actually does grow the buffer (at least in
some cases) it is probably a bug in the code.

It might make the problem occur less often though, so go ahead and try.
Switching up to 8kB buffers by default should not matter much.

> 2) is there only one place where the buffer size is set, or are there more?

It is set in one class only, in CachingBufferHandler.java.

/robo



More information about the Rabbit-dev mailing list