494 Error

A 494 Request header too large error is an nginx-specific code for:

“nginx rejected your request because your request line or headers exceeded the server's buffer.”

A 494 Request header too large error is an internal status code used by nginx when the client’s request line or header fields exceed the memory buffer limits allocated by the server.

Before returning a standard 400 or 431 response to the client, nginx logs code 494 internally to identify that the request was aborted due to oversized header buffers.

Determining why

Web browsers sending large numbers of cookies or very long query strings can exceed the default buffer size (typically 4 KB or 8 KB) configured in nginx’s large_client_header_buffers directive.

Steps you could possibly take:

  • Clear cookies for the website - Deleting stored cookies for the target domain immediately resolves header overflow issues.
  • If you are the server administrator:
    • Increase the header buffer size in your nginx.conf by configuring:
      large_client_header_buffers 4 16k;
    • Reload nginx with nginx -s reload.

Source: nginx Documentation - ngx_http_core_module