views:

797

answers:

1

I am using Nginx in front of 10 mongrels.

When I make a request with size > 2900 I get back an "error code 414: uri too large".

Does anyone know the setting in the nginx conf file which determines the allowed uri length ?

Thanks, Prakash Raman

+1  A: 

From: http://wiki.nginx.org/NginxHttpCoreModule#large_client_header_buffers

large_client_header_buffers

syntax: large_client_header_buffers number size
default: large_client_header_buffers 4 4k/8k
context: http, server

Directive assigns the maximum number and size of buffers for large headers to read from client request.

The request line can not be bigger then the size of one buffer, if the client send a bigger header nginx returns error "Request URI too large" (414).

The longest header line of request also must be not more than the size of one buffer, otherwise the client get the error "Bad request" (400).

Buffers are separated only as needed.

By default the size of one buffer is equal to the size of page, depending on platform this either 4K or 8K, if at the end of working request connection converts to state keep-alive, then these buffers are freed.

so you need to change the size parameter at the end of that line to something bigger for your needs.

Stobor