On 10/21/12 12:06 AM, Willy Tarreau wrote:
On Sun, Oct 21, 2012 at 12:01:10AM +0400, Dmitry Sivachenko wrote:
As I wrote in my original e-mail, I use tune.bufsize=32768.  I did not
tweak tune.maxrewrite though.
I will try to decrease maxrewrite to 1024 and see if 'show errors' will
dump more that 16k of URL.

I don't fully understand it's meaning though.
If I need to match up to 25k size requests using reqrep directive, will
tune.bufsize=32768 and tune.maxrewrite=1024 be enough for that?
Yes. The max request that can be read at once is bufsize-maxrewrite. And
since maxrewrite defaults to bufsize/2, I think you were limited to 16k
which is in the same range as your request.



Please consider the following patch for configuration.txt to clarify meaning of
bufsize, maxrewrite and the size of HTTP request which can be processed.

Thanks.

--- configuration.txt.orig      2012-08-14 11:09:31.000000000 +0400
+++ configuration.txt   2012-10-21 18:08:01.000000000 +0400
@@ -683,6 +683,8 @@
statistics, and values larger than default size will increase memory usage, possibly causing the system to run out of memory. At least the global maxconn parameter should be decreased by the same factor as this one is increased. + If HTTP request is larger than tune.bufsize - tune.maxrewrite, haproxy will
+  return HTTP 400 (Bad Request) error.

 tune.chksize <number>
Sets the check buffer size to this size (in bytes). Higher values may help
@@ -4346,8 +4348,8 @@
      # replace "www.mydomain.com" with "www" in the host name.
      reqirep ^Host:\ www.mydomain.com   Host:\ www

-  See also: "reqadd", "reqdel", "rsprep", section 6 about HTTP header
-            manipulation, and section 7 about ACLs.
+  See also: "reqadd", "reqdel", "rsprep", "tune.bufsize", section 6 about
+            HTTP header manipulation, and section 7 about ACLs.


 reqtarpit  <search> [{if | unless} <cond>]

Reply via email to