亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Where is the nginx configuration server_names_hash_max_size placed?
高洛峰
高洛峰 2017-05-16 17:18:01
0
1
1833

The operating system is centos 7.2, use

# /usr/sbin/nginx -s reload

When reloading the nginx configuration, the following information is displayed:

[root@i001 ~]# /usr/sbin/nginx -s reload
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64; ignoring server_names_hash_bucket_size

Let addserver_names_hash_max_size: 512,
or
server_names_hash_bucket_size: 64,
Ignore
server_names_hash_bucket_size,
The question is:
1. In what file does it need to be added?
2. What is the format? Is there a semicolon or something like that? I tried it but it was always wrong.
3. Ignoreserver_names_hash_bucket_sizeDoes it mean to delete this item when you see it?

高洛峰
高洛峰

擁有18年軟件開發(fā)和IT教學(xué)經(jīng)驗。曾任多家上市公司技術(shù)總監(jiān)、架構(gòu)師、項目經(jīng)理、高級軟件工程師等職務(wù)。 網(wǎng)絡(luò)人氣名人講師,...

reply all(1)
給我你的懷抱

Solution

Add this sentence to http{} in /usr/local/nginx/conf/nginx.conf

 server_names_hash_max_size 512;

Use sudo /usr/local/nginx/sbin/nginx -t to check the nginx configuration file, if there is still a prompt

could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64

Then increase server_names_hash_max_size

 server_names_hash_max_size 1024;

Error reason

The hash table that saves server names is controlled by the instructions 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 speed up the search for hash table key values ??in the processor. If the hash bucket size is equal to the size of the processor cache, then when searching for a key, the number of searches in the memory is 2 in the worst case. The first time is to determine the address of the storage unit, and the second time is to find the key value in the storage unit. Therefore, if Nginx gives a prompt that the hash max size or hash bucket size needs to be increased, the first thing to do is to increase the size of the previous parameter.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template