494 Request Header Too Large
Internal nginx code for a request whose headers exceeded the configured buffer, logged before a 400 is returned.
Status
HTTP/1.1 494 Request Header Too Large
Details
- Category: 4xx
- Status: Unofficial (nginx). Not registered with IANA. A server, framework, or CDN convention.
- Specification: none, not defined by any RFC
- Cacheable: Not cacheable
- Response body: Allowed
- Retry: Retry only after changing the request
nginx uses 494 internally when the request header block does not fit in client_header_buffer_size or large_client_header_buffers. The client normally receives a 400, so 494 is something you find in logs rather than on the wire.
It predates the standardization of 431, which is the correct code to return for this condition today.
Common causes
- Oversized cookies or authorization headers.
- large_client_header_buffers set too small for legitimate traffic.
How to fix it
As the client
- Clear cookies for the site and shrink any large custom headers or tokens.
As the server
- Increase large_client_header_buffers, for example to 4 16k, when large headers are legitimate.
- Return 431 to clients so the condition is expressed in a standard code.
Examples
(nginx error log) client sent too long header line, request: "GET / HTTP/1.1", status 494