Error 400: Size of a request header field exceeds server limit

Posted in PHP

If you get error like this one

Error 400
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.

That means that your browser is trying to send too much at once. Probably, it’s size of the cookies. The easy way to fix it – delete cookies. Of course, you lose all info in the cookies, but at least you can access site again.

If you develop/manage web site and your customers complain of this error message – there are two things to do:

  • Review cookies and limit the size of cookies your application stores in the browser.
  • Increase allowed request size in web server configuration

To increase request size in Apache, add directive LimitRequestFieldSize to the configuration file. Default value is 8190 bytes. To increase it 2 times add
LimitRequestFieldSize 16380
Apache restart is required.


  1. Thank you, Andrei.
    You helped me a lot.
    A customer could not access application on https site via iPhone.
    Reason: application stores ‘history data’ in cookie, cookie grows and grows…

  2. Glad to hear! I was really frustrated with that issue myself – that’s the reason of post :D

  3. Thanks for that. Sorted my problem….well when I blew the site cookies away. Couldn’t see the not so obvious Mozilla Firefox setting change.

  4. Works good for me:) Thank you.

  5. Thank you very much. My problem solved… 2 thumbs up for you

  6. Sounds like the right diagnosis. Rather than blow the cookies away I just copy/pasted link into a browser I otherwise don’t use very much (and presumable had fewer stored cookies).

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>