query string max length tweak ?

Eric Wong normalperson at yhbt.net
Thu Jun 23 14:37:32 EDT 2011


Mohit Chawla <mohit.chawla.binary at gmail.com> wrote:
> Hi,
> 
> Is there a way that would allow us to increase the max length allowed
> for query_string ? We have been getting 414s on large GET requests. We
> are running the puppet master under unicorn behind nginx. I am not
> sure of the general implications of this, whether its suggested/safe
> even, but it is somewhat of a necessity. Any suggestions ?

You can change the following lines in ext/unicorn/global_variables.h
and rebuild the parser:

  DEF_MAX_LENGTH(REQUEST_URI, 1024 * 12);
  ...
  DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10));

There's currently no way to configure them otherwise, but I can consider
dropping these per-field limits entirely.  We now have a config option
to set the maximum header size (only exposed via Rainbows!, though).

This means we would only care about the size of the entire header, and
not the size of any individual element.  I consider the size of the
entire header more important anyways.  We currently don't have
limits on the number of headers that can be sent.

-- 
Eric Wong


More information about the mongrel-unicorn mailing list