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的提示,那么首要的是增大前一个参数的大小.

nginx could not build the server_names_hash 解决方法的更多相关文章

  1. Nginx: could not build the server_names_hash 解决办法

    # /etc/init.d/nginx reload * Reloading nginx configuration nginx [fail] # nginx -t nginx: [emerg] co ...

  2. Nginx 499错误的原因及解决方法

    今天进行系统维护,发现了大量的499错误, 499错误 ngx_string(ngx_http_error_495_page), /* 495, https certificate error */n ...

  3. Nginx的500,502,504错误解决方法

    Nginx的500,502,504错误解决方法 一.解决500错误: 1.500错误指的是服务器内部错误,也就是服务器遇到意外情况,而无法履行请求. 2.500错误一般有几种情况: (1)web脚本错 ...

  4. Nginx 504 Gateway Time-out分析及解决方法

    一.场景还原php程序在执行抓取远程图片库并保存至本地服务器的时候,出现了“504 Gateway Time-out”错误提示. 问题定位:由于图片巨多,所以下载时间很长(10分钟以上),引起网关超时 ...

  5. Nginx常见错误与问题之解决方法技术指南

      Nginx常见错误与问题之解决方法技术指南. 安装环境: 系统环境:redhat enterprise 6.5 64bit 1.Nginx 常见启动错误 有的时候初次安装nginx的时候会报这样的 ...

  6. 今天用pro安装nginx+php+mysql出现故障的解决方法

    今天用pro安装nginx+php+mysql出现故障的解决方法 by 伍雪颖 dyld: Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1h ...

  7. 腾讯云服务器php+mysq+nginx配置出现的问题及解决方法(亲测)

    http://blog.csdn.net/hfdmv/article/details/50900043 删除文件命令 sudo rm -f /usr/share/nginx/html/home.php ...

  8. nginx 出现504 Gateway Time-out的解决方法

    本文介绍nginx出现504 Gateway Time-out问题的原因,分析问题并提供解决方法. 1.问题分析nginx访问出现504 Gateway Time-out,一般是由于程序执行时间过长导 ...

  9. Nginx中的惊群现象解决方法

    *什么是惊群现象?Nginx中用了什么方法来避免这种问题的发生?本篇就解决这两个问题...→_→* 惊群现象的定义与危害 在Nginx中,每一个worker进程都是由master进程fork出来的.m ...

随机推荐

  1. .NET发布网站出现了一系列问题(1)---“无法显示XML页”的解决办法

    原文发布时间为:2008-09-11 -- 来源于本人的百度文章 [由搬家工具导入] 原因之一: 这种错误是由asp.net 帐户没有在iis注册造成的。原因可能是.net framework 2.0 ...

  2. [LeetCode] Search Insert Position 二分搜索

    Given a sorted array and a target value, return the index if the target is found. If not, return the ...

  3. EOJ Monthly 2018.1 F 最小OR路径

    题目链接 Description 给定一个有 \(n\) 个点和 \(m\) 条边的无向图,其中每一条边 \(e_i\) 都有一个权值记为 \(w_i\) . 对于给出的两个点 \(a\) 和 \(b ...

  4. 补不manjaro系统

    昨天无意间看到:使用不同的主题时,使用midna图标时,关机的按钮和其他的不同,经过摸索,只需要更改替换3个图标即可: (1)进入目录/usr/share/icons/breeze/actions/t ...

  5. python操作word、ppt的详解

    python使用win32com的心得   python可以使用一个第三方库叫做win32com达到操作com的目的, 我是安装了ActivePython的第三方库,从官网下载了安装包,该第三方库几乎 ...

  6. poj 1061(线性同余)

    青蛙的约会 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 104278   Accepted: 20356 Descript ...

  7. 解决mysql 远程链接问题

    grant all privileges on *.* to 'root'@'192.168.2.204' identified by '123456' with grant option;flush ...

  8. asp.net mvc 5 利用ActionFilterAttribute实现权限过滤

    关于c#属性的教程:http://www.runoob.com/csharp/csharp-attribute.html 在asp.net mvc5中,可以利用ActionFilterAttribut ...

  9. HDU 5869.Different GCD Subarray Query-区间gcd+树状数组 (神奇的标记右移操作) (2016年ICPC大连网络赛)

    树状数组... Different GCD Subarray Query Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/6 ...

  10. Codeforces 746G(构造)

                                                                                                      G. ...