Changing server_names_hash_max_size on nginx always back to defaulr value

lambov

Member
Oct 9, 2016
21
0
51
Earth
cPanel Access Level
Root Administrator
i am using cpanel with nginx proxy, and i get the following warning when restarting nginx
nginx[3271513]: nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 1024 or server_names_hash_bucket_size: 128; ignoring server_names_hash_bucket_size

then i change server_names_hash_max_size to 16386, but after several time, the value back to 1024

whats wrong about it
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,831
1,881
363
cPanel Access Level
Root Administrator
Hey there! When you edit the configuration file, are you changing /etc/nginx/conf.d/ea-nginx.conf as outlined here?

 

Bidi

Well-Known Member
Oct 3, 2012
118
15
68
Romania, Transilvania
cPanel Access Level
DataCenter Provider
Hello,

Same problem to me after making the changes i still get

nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 1024 or server_names_hash_bucket_size: 256; ignoring server_names_hash_bucket_size
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 1024 or server_names_hash_bucket_size: 256; ignoring server_names_hash_bucket_size
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 1024 or server_names_hash_bucket_size: 256; ignoring server_names_hash_bucket_size
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 1024 or server_names_hash_bucket_size: 256; ignoring server_names_hash_bucket_size

I had to increase this to

server_names_hash_max_size 2048;
server_names_hash_bucket_size 512;

after all ok

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

I dont know if its to high or not.