nginx + cookies + firefox = 400 Bad Request
Neil Sheth
nsheth at gmail.com
Fri Dec 19 11:36:55 MSK 2008
Tried increasing the large_client_header_buffers setting as suggested,
but it had no effect on my 400s. Any other suggestions? A bit at a
loss at this point, so open to any suggestions. Thanks!
On Tue, Dec 16, 2008 at 1:35 AM, Neil Sheth <nsheth at gmail.com> wrote:
> Setting the error_log to info, I'm seeing that a lot of the 400
> requests have a corresponding entry in the error log saying "client
> closed prematurely connection while reading client request line" - any
> suggestions from that?
>
> Thanks!
>
> On Tue, Dec 16, 2008 at 12:22 AM, Igor Sysoev <is at rambler-co.ru> wrote:
>> On Mon, Dec 15, 2008 at 05:59:07PM -0800, Neil Sheth wrote:
>>
>>> I'm continuing to also see issues with nginx returning 400s, I posted
>>> another thread about this earlier. The suggestions here are worth
>>> trying, hopefully they help!
>>>
>>> For the large_client_header_buffers setting, what values are recommended?
>>
>> To see 400' reasons you should set error_log level to info:
>>
>> error_log /path/to/log info;
>>
>> They may be not associated with bufers at all.
>>
>> As to large_client_header_buffers, Apache's default one header limit is 8K:
>> http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestfieldsize
>>
>> nginx's defaults are
>>
>> client_header_buffer_size 1k;
>> large_client_header_buffers 4 4k;
>> # or 4 8k for sparc64/ppc64 (but not amd64)
>>
>> You will see in log that these buffers are no enough, you may set
>>
>> client_header_buffer_size 1k;
>> large_client_header_buffers 8 8k;
>>
>>> Also, for proxy_buffers, I have the following:
>>> proxy_buffer_size 4k;
>>> proxy_buffers 4 32k;
>>> proxy_busy_buffers_size 64k;
>>> proxy_temp_file_write_size 64k;
>>>
>>> Any suggestions if those should be tweaked in any manner?
>>>
>>> Thanks!
>>>
>>>
>>>
>>> On Mon, Dec 15, 2008 at 2:46 AM, Oliver Pestring <lists at ruby-forum.com> wrote:
>>> > Maxim Dounin wrote:
>>> >> You should tune large_client_header_buffers in your nginx config, see
>>> >> http://wiki.codemongers.com/NginxHttpCoreModule#large_client_header_buffers
>>> >> for details.
>>> >>
>>> >> The problem AFAIK is vbulletin which sets enormous number of
>>> >> various cookies.
>>> >
>>> >
>>> > Many thanks guys! It seems that the issue doesnt occur with the
>>> > 0.7.26-version. I compiled it manually yesterday evening and vbulletin
>>> > and Mantis work perfectly with the previous config until now.
>>> > Just to be sure Ive now followed your advices and added some larger
>>> > values for large_client_header_buffers and proxy_buffer_size too. Also
>>> > switched from cookie-based activity to db-based for vb.
>>> >
>>> > My testsystem is still on lennys 0.6.32 and here an increased
>>> > large_client_header_buffers was even enough to get it working again.
>>> > Perfect ;)
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Posted via http://www.ruby-forum.com/.
>>> >
>>> >
>>
>> --
>> Igor Sysoev
>> http://sysoev.ru/en/
>>
>>
>
More information about the nginx
mailing list