HTTP 431 Request Header Fields Too Large
HTTP 431 Request Header Fields Too Large means the server refuses to process the request because one header field or the combined header section is too large. Long cookies, accumulated forwarding metadata and oversized authorization headers can contribute.
Find the largest fields safely
Compare a fresh browser profile with the affected profile if cookies are suspected, or inspect header lengths at the client and the gateway. Keep field names and byte counts in diagnostic logs while redacting session and credential values.
Fix the component that grows the request
If the application issues too many cookies, review their size and scope. If your gateway appends headers on every internal hop, verify how it handles the forwarding chain. Align size limits only after finding the actual requirement. For an oversized body or URL, see 413 or 414.
Compare the failing request with a clean session
A returning browser can attach several cookies to shop.example.com while a fresh session sends almost none. If only the returning session receives HTTP 431 for the same page, compare the approximate length of the Cookie field and check which cookie scopes caused those values to be sent. Use a fresh profile for the comparison before clearing a session that you may need. A tool that records only header names and lengths can locate large fields without exposing the values.
Measure each request at the receiving hop
An individual field may hit its limit even when the total header block looks small. The opposite can happen when many ordinary fields add up. If you run the service, identify which gateway or application sent 431 and compare the limits it enforces with those on the next hop. Repeat one known request after fixing the source of the oversized values, then confirm the smaller request reaches the origin. nginx can use the internal code 494 for a related condition.