首页服务器Web服务器 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”解决方法

给一个服务器下增加了一些站点别名,差不多有20多个。

重启nginx时候,提示:

could not build the serve…

nginx “nginx could not build the server_names_hash”解决方法

给一个服务器下增加了一些站点别名,差不多有20多个。

重启nginx时候,提示:

could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32

解决方法:

在配置文件的http{}段增加一行配置
server_names_hash_bucket_size 64;
如果64还不够,那么就按32的倍数往上加。

下面是在中文wiki上摘抄的一段说明:

保存服务器名字的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的提示,那么首要的是增大前一个参数的大小.
本文来自网络,不代表1号站长-站长学院|资讯交流平台立场。转载请注明出处: https://www.1cn.cc/fwq/web/7969.html
上一篇win2003遭受udp攻击导致带宽占用很大
下一篇 DNS服务器管理与配置技巧浅谈
admin

作者: admin

这里可以再内容模板定义一些文字和说明,也可以调用对应作者的简介!或者做一些网站的描述之类的文字或者HTML!

为您推荐

评论列表()

    联系我们

    联系我们

    0898-88888888

    在线咨询: QQ交谈

    邮箱: email@wangzhan.com

    工作时间:周一至周五,9:00-17:30,节假日休息

    关注微信
    微信扫一扫关注我们

    微信扫一扫关注我们

    关注微博
    返回顶部