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

Tagged In:
Author: boopage Date: July 8, 2013
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 Tagged In:
There are 4 answers
kamaln7
Mod
July 8, 2013
HeartedHeart
2
Try increasing the large_client_header_buffers directive in nginx,

server {
...
large_client_header_buffers 4 16k;
...
}
kamaln7
Mod
July 8, 2013
HeartedHeart
Try clearing your browser's cookies, does that fix it?
boopage July 8, 2013
HeartedHeart
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
selfmade_ August 30, 2013
HeartedHeart
thanks buddy its fix my issue

Regards,
Owais