nginx 添加几十个域名后报错server_names_hash
2013-09-29 10:33
316 查看
nginx 添加几十个域名后报错
nginx: [emerg] could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64
nginx: configuration file /etc/myconf/nginx/nginx.conf test failed
网上查到解决办法:
在nginx.conf配置文件的http{}把server_names_hash_bucket_size 128改为server_names_hash_bucket_size 512,按32的倍数往上加,再重启问题解决。
保存服务器名字的hash表是由指令 server_names_hash_max_size 和 server_names_hash_bucket_size所控制的。参数hash bucket size总是等于hash表的大小,并且是一路处理器缓存大小的倍数。在减少了在内存中的存取次数后,使在处理器中加速查找hash表键值成为可能。如果 hash bucket size等于一路处理器缓存的大小,那么在查找键的时候,最坏的情况下在内存中查找的次数为2。第一次是确定存储单元的地址,第二次是在存储单元中查找键值。因此,如果Nginx给出需要增大 hash max size 或 hash bucket size的提示,那么首要的是增大前一个参数的大小.
本文出自 “吾心” 博客,请务必保留此出处http://leeforget.blog.51cto.com/6950397/1303299
nginx: [emerg] could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64
nginx: configuration file /etc/myconf/nginx/nginx.conf test failed
网上查到解决办法:
在nginx.conf配置文件的http{}把server_names_hash_bucket_size 128改为server_names_hash_bucket_size 512,按32的倍数往上加,再重启问题解决。
保存服务器名字的hash表是由指令 server_names_hash_max_size 和 server_names_hash_bucket_size所控制的。参数hash bucket size总是等于hash表的大小,并且是一路处理器缓存大小的倍数。在减少了在内存中的存取次数后,使在处理器中加速查找hash表键值成为可能。如果 hash bucket size等于一路处理器缓存的大小,那么在查找键的时候,最坏的情况下在内存中查找的次数为2。第一次是确定存储单元的地址,第二次是在存储单元中查找键值。因此,如果Nginx给出需要增大 hash max size 或 hash bucket size的提示,那么首要的是增大前一个参数的大小.
本文出自 “吾心” 博客,请务必保留此出处http://leeforget.blog.51cto.com/6950397/1303299
相关文章推荐
- nginx 虚拟主机多域名问题 【server_names_hash_bucket_size】
- nginx配置出错 could not build the server_names_hash, you should increase either server_names_hash_max_si
- Nginx出现could not build the server_names_hash 解决办法
- 使用Nginx做反向代理时在error.log中出现server_names_hash_bucket_size大小不足问题的解决方案
- nginx could not build the server_names_hash 解决方法
- nginx添加几十个域名
- Nginx 的 server_names_hash_bucket_size 问题
- Nginx could not build the server_names_hash 错误的解决办法
- nginx问题之nginx: could not build server_names_hash, you should increase server_names_hash_bucket_size解决方案
- Nginx: could not build the server_names_hash 解决办法
- Nginx 的 server_names_hash_bucket_size 问题
- Nginx 的 server_names_hash_bucket_size 问题
- Nginx:nginx could not build the server_names_hash解决办法
- Nginx: could not build the server_names_hash 解决办法
- Nginx could not build the server_names_hash 错误的解决办法
- nginx “nginx could not build the server_names_hash”解决方法
- nginx.org的Server names页面翻译
- Nginx多域名多Server反向代理配置
- nginx could not build the server_names_hash错误
- Nginx server之Nginx添加ssl支持