nginx配置出错 could not build the server_names_hash, you should increase either server_names_hash_max_si
来源:互联网 发布:java图形界面编程ppt 编辑:程序博客网 时间:2024/05/22 17:48
错误信息
could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64
解决办法
在/usr/local/nginx/conf/nginx.conf中http{}加入这样一句话
server_names_hash_max_size 512;
使用 sudo /usr/local/nginx/sbin/nginx -t对nginx配置文件进行检查,如果还提示
could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64
则再把 server_names_hash_max_size升值
server_names_hash_max_size 1024;
错误原因
保存服务器名字的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://wiki.nginx.org/Optimizations
- 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 could not build the server_names_hash 错误的解决办法
- N9,the best phone you should NOT buy
- WebLogic配置oracle数据源出错-Oracle the network adapter could not establish the connection
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct acces
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct acces
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct acces
- mysql报错:could not find settings Either the server service or the configuration file could not be fou
- mysql :Could not increase number of max_open_files
- 配置MySQL出错The service could not be started. Error:0 解决
- Uncaught Error: [$injector:nomod] Module 'xxx' is not available! You either misspelled the m
- Module 'starter' is not available! You either misspelled the module name or forgot to load it.
- Brew AppLoader "Error - Either could not detect any device with the specified"
- when not using the appcompat library, you should be using the android:showAsAction attribute.
- adstpall.sh: Database connection could not be established. Either the database is down or the APPS c
- jar出错 could not find the main class
- Logcat出错:Could not create the view: For input string: ""
- Ubuntu 10.4 下安装gSOAP安装过程和问题解决
- handler 结
- Android CTS Test
- ESET ESS/EAV 4.2.64.12 官方简体中文版下载
- cookie 科普 以及 探索
- nginx配置出错 could not build the server_names_hash, you should increase either server_names_hash_max_si
- php mysql数据库操作类
- 郑莉版c语言第六章课后习题答案
- .net调试越来越慢(不是原创,网上摘的)
- C/C++中指针和引用之相关问题研究
- SQL 查询当天,本月,本周的记录
- Win32应用程序的加载与启动分析 .
- Oracle中的大字段 Blob/Clob
- Win32中进程与线程的概念、联系与区别引论 .