boopage
By:
boopage

400 bad request request header or cookie too large nginx Rails app

July 8, 2013 17k views
Hi, I am getting 400 bad request request header or cookie too large nginx with my Rails app, restarting browser fixes the issue. I am only storing a string id in my cookie so it should be tiny. Where can I find the nginx error logs? I looked at nano /opt/nginx/logs/error.log, but it doesn’t have anything related.. Any help Thx Leo
6 Answers
Try increasing the large_client_header_buffers directive in nginx,

server {
...
large_client_header_buffers 4 16k;
...
}
Try clearing your browser's cookies, does that fix it?
Yes, it dose.

But it will come back again. I cannot find anything wrong with my code. So what is the best way to debug this? like I said I cannot find anything in /opt/nginx/logs/error.log

thx
Leo
thanks buddy its fix my issue

Regards,
Owais
[deleted]
[deleted]
Have another answer? Share your knowledge.