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 ?
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
Hi, On Fri, Jun 24, 2011 at 12:07 AM, Eric Wong <normalperson at yhbt.net> wrote:> 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.Thanks a lot, yes I was trying out changing only the QUERY_STRING max length, but that wasn''t working. Will change the REQUEST_URI max length as well. Also, I am new to using unicorn, hence not aware if using Rainbows! in this scenario can be achieved/is suggested ? Nice to know about limiting the entire size header in future releases ( in prod we are using 1.1.4 ! ). Also, sorry for the multiple html mails before this !
Mohit Chawla <mohit.chawla.binary at gmail.com> wrote:> Also, I am new to using unicorn, hence not aware if > using Rainbows! in this scenario can be achieved/is suggested ? Nice > to know about limiting the entire size header in future releases ( in > prod we are using 1.1.4 ! ).No, Rainbows! is focused on network concurrency. Unicorn can just use nginx for stopping large requests (large_client_header_buffers in nginx) and not be concerned about large headers at all.> Also, sorry for the multiple html mails before this !I just made the mailman config on rubyforge kill all HTML :) -- Eric Wong