HTTP 494 nginx Request Header Too Large

A rack server’s small header buffer overflows with identifier slips

nginx uses the internal code 494 when request headers exceed its handling limits. nginx can use that value for error-page processing and normally sends HTTP 400 to the client in its default special-response handler.

Find the header that exceeds the limit

Long cookies or a large authentication field can trigger the error. Check the nginx error log for the rejected request. Compare header lengths from a clean client session with the failing session, preserving field names and redacting values.

Review the first nginx hop that rejects the request

If you manage the site, check header buffer settings for the matching server and the size of the fields your application issues. The forward proxy and the site’s reverse proxy can have independent limits. HTTP 431 is the standard response for oversized header fields.

Why a client might display 400

A large request header can reach nginx's internal error handling as 494 and appear to the application using the proxy as 400. If a large cookie is the cause, the failing request often comes from an existing browser session. Try the same route with a clean browser profile, then compare the names and sizes of the request headers at the first server that rejects it. Cookie and token values are unnecessary for this comparison.

Check the per-field nginx buffer limit

The nginx large_client_header_buffers setting governs buffers available when large request headers are read. A single request header field must fit in one buffer. Increasing the buffer count alone does not give one oversized field more space. If you own the server, identify the largest field and check the effective configuration on the listener handling that request. Test the change with a representative request and check the next hop's limit too. nginx request header buffer documentation.

nginx source for HTTP status codes.

All HTTP status codes · All proxy testing guides · Open the proxy tester