Go Request Header Or Cookie Too Large (Nginx config)

Source: Internet
Author: User

See huoding.com on the better posts, so understand and use their own words to describe

Increase client_header_buffer_size and large_client_header_buffers can solve the problem, but for Mao to two parameters to control it? Can one meet the requirements soon?

The client_header_buffer_size is used to cache the request header and returns a 400 error if it is exceeded. However, if the majority of requests do not exceed this value, then the larger request header can be affected by large_client_headers_buffers.

or the exact words of the nginx?

  • client_header_buffer_size: Sets buffer size for reading client request header. For most requests, a buffer of 1K bytes is enough. However, if a request includes long cookies, or comes from a WAP client, it may not fit into 1K. If a request line or a Request header field does not fit into this buffer then larger buffers, configured by the LARGE_CLI Ent_header_buffers directive, is allocated.
  • large_client_header_buffers: Sets the maximum number and size of buffers used for reading large client request he Ader. 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 the "Bad Request" error is returned to the CLI Ent. Buffers is allocated only on demand. By default, the buffer size is equal to 8K bytes. If after the end of request processing a connection was transitioned into the keep-alive state, these buffers is released.

The reason to control the cache size with two parameters is to balance the contradiction between memory resources and processing speed.

Go Request Header Or Cookie Too Large (Nginx config)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.