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
- Immediate user fix: clear cookies for the site.
- Real fix: find what grows the cookie and cap it; move fat tokens out of headers (session reference instead of full JWT).
- Server limits can be raised (nginx large_client_header_buffers), but treat that as a workaround, not the fix.
Easily confused with
Debugging an API? Build and inspect requests, check response headers, or read the full status-code debugging guide.