431 Request Header Fields Too Large

The request line or headers exceed the server's size limits — in practice, almost always runaway cookies. One misbehaving script appending to a cookie on every page view will eventually push every request past the limit.

What usually causes it

  • Accumulated cookies (analytics, A/B tools, session bloat) exceeding ~8 KB defaults
  • Huge JWTs stored in cookies or Authorization headers
  • Long URLs used as data transport

How to debug and fix it

  1. Immediate user fix: clear cookies for the site.
  2. Real fix: find what grows the cookie and cap it; move fat tokens out of headers (session reference instead of full JWT).
  3. Server limits can be raised (nginx large_client_header_buffers), but treat that as a workaround, not the fix.

Easily confused with