当前位置:网站首页>“could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32” 问题处理
“could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32” 问题处理
2022-07-26 09:00:00 【愤世大魔头】
刚刚重启了一下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这个值,可以进行相应的调整 这个报错出现的原因是:因为Nginx中的server配置中server_name的定义值过长! 那为什么Server_name过长会导致这个问题,才是关键: 服务器名字的hash表是由指令 server_names_hash_max_size 和 server_names_hash_bucket_size所控制的。 根据Nginx的官方文档分析,server_names_hash_bucket_size的默认值有可能是32也有可能是64,或者是其他值,这个默认值的大小取决于CPU的缓存行长度。 参数hash bucket size总是等于hash表的大小,并且是一路处理器缓存大小的倍数。 在减少了在内存中的存取次数后,使在处理器中加速查找hash表键值成为可能。 如果 hash bucket size等于一路处理器缓存的大小,那么在查找键的时候,最坏的情况下在内存中查找的次数为2。第一次是确定存储单元的地址,第二次是在存储单元中查找键值。因此,如果Nginx给出需要增大 hash max size 或 hash bucket size的提示,那么首要的是增大前一个参数的大小。
边栏推荐
- unity TopDown角色移动控制
- Learning notes of automatic control principle - Performance Analysis of continuous time system
- JS file import of node
- Cve-2021-21975 VMware SSRF vulnerability recurrence
- My meeting of OA project (query)
- Hegong sky team vision training Day6 - traditional vision, image processing
- My meeting of OA project (meeting seating & submission for approval)
- Two tips for pycharm to open multiple projects
- Day06 homework -- skill question 1
- node-v下载与应用、ES6模块导入与导出
猜你喜欢
Matlab 绘制阴影误差图
【数据库 】GBase 8a MPP Cluster V95 安装和卸载
第6天总结&数据库作业
Babbitt | metauniverse daily must read: does the future of metauniverse belong to large technology companies or to the decentralized Web3 world
2000年的教训。web3是否=第三次工业革命?
Numpy Foundation
JS file import of node
Set of pl/sql
2022茶艺师(中级)特种作业证考试题库模拟考试平台操作
Database operation topic 2
随机推荐
网络安全漫山遍野的高大上名词之后的攻防策略本质
Typescript encryption tool passwordencoder
数据库操作 技能6
机器学习中的概率模型
Datawhale panda book has been published!
CSDN TOP1“一个处女座的程序猿“如何通过写作成为百万粉丝博主?
day06 作业--技能题1
[eslint] Failed to load parser ‘@typescript-eslint/parser‘ declared in ‘package. json » eslint-confi
Day 6 summary & database operation
Study notes of automatic control principle --- stability analysis of control system
unity简易消息机制
The lessons of 2000. Web3 = the third industrial revolution?
Babbitt | metauniverse daily must read: does the future of metauniverse belong to large technology companies or to the decentralized Web3 world
[database] gbase 8A MPP cluster v95 installation and uninstall
TypeScript版Snowflake主键生成器
数据库操作 题目二
P3743 Kotori's equipment
sklearn 机器学习基础(线性回归、欠拟合、过拟合、岭回归、模型加载保存)
【无标题】
pycharm 打开多个项目的两种小技巧