Tags
Issue:
400 Bad Request – request header or cookie too large
Solution:
Increase the size of large_client_header_buffers of server/http block in Nginx
server { # ... large_client_header_buffers 4 32k; # or more according to the need # ... }
Synopsis :
Sets the maximum number and size of buffers used for reading large client request header. A request line cannot exceed the size of one buffer, or the 414 (Request-URI Too Large) error is returned to the client.
A request header field cannot exceed the size of one buffer as well, or the 400 (Bad Request) error is returned to the client. Buffers are allocated only on demand. By default, the buffer size is equal to 8K bytes. If after the end of request processing a connection is transitioned into the keep-alive state, these buffers are released.
By the way, the default buffer number and size is 4 and 8k, so the header must be the one that’s over 8192 bytes.
In this case, all those cookies (which combine to one header) are well over the limit.
For more details please refer Nginx Site