Nginx configuration error could not builds the Server_names_hash, you should increase either

Source: Internet
Author: User

error Message

Could not builds the Server_names_hash, you should increase either server_names_hash_max_size:512 or Server_names_hash_buc Ket_size:64

Solutions

In/usr/local/nginx/conf/nginx.conf http{} to join in such a sentence

Server_names_hash_max_size 512;

Use Sudo/usr/local/nginx/sbin/nginx-t to check the Nginx configuration file if you are prompted

Could not builds the Server_names_hash, you should increase either server_names_hash_max_size:512 or Server_names_hash_buc Ket_size:64

Then the Server_names_hash_max_size appreciation

server_names_hash_max_size 1024;

cause of the error

The hash table that holds the server name is controlled by instruction Server_names_hash_max_size and server_names_hash_bucket_size. The parameter hash bucket size is always equal to the size of the hash table and is a multiple of the processor cache size. After reducing the number of accesses in memory, it is possible to accelerate the lookup of hash key values in the processor. If the hash bucket is equal to the size of the processor cache at the same time, the number of times to find the key in memory is 2. The first time is to determine the address of the storage unit, and the second is to locate the key value in the storage cell. Therefore, if nginx gives hints that need to increase the size of the hash max size or hash bucket, it is important to increase the previous parameter.

Refer to official Documentation: Http://wiki.nginx.org/Optimizations



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.