Gravatar

boopage

July 8, 2013

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

Tagged In: Ruby On Rails

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

Share this Question

Vote on Hacker News
  • Gravatar Kamal Nasser July 8, 2013
    Try clearing your browser's cookies, does that fix it?
  • Gravatar boopage July 8, 2013
    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
  • Gravatar Kamal Nasser July 8, 2013
    Try increasing the large_client_header_buffers directive in nginx,

    server {
    ...
    large_client_header_buffers 4 16k;
    ...
    }
  • Gravatar selfmade_ August 30, 2013
    thanks buddy its fix my issue

    Regards,
    Owais
Create an account or login:
Ajax-loader