当前位置:网站首页>"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:07:00 【Angry devil】
Just restarted nginx, result , The service doesn't work , Go to the error log file and have a look , result , I found this mistake : could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32 I searched the related posts , quite a lot , The solution is simple , Is in the http layer , Add the following : server_names_hash_bucket_size 64; #64 This value , It can be adjusted accordingly The reason for this error is : because Nginx Medium server Configuration in progress server_name The definition value of is too long ! What then? Server_name Too long will cause this problem , That's the key : Server name hash The table is ordered by server_names_hash_max_size and server_names_hash_bucket_size Controlled by . according to Nginx Analysis of official documents ,server_names_hash_bucket_size The default value of may be 32 It could be 64, Or some other value , The size of this default value depends on CPU Cache line length of . Parameters hash bucket size Always equal to hash The size of the table , And it's a multiple of the cache size of the processor along the way . After reducing the number of accesses in memory , Speed up the search in the processor hash Table key values become possible . If hash bucket size Equal to the size of the processor cache , So when it comes to finding keys , In the worst case, the number of lookups in memory is 2. The first time is to determine the address of the storage unit , The second time is to find the key value in the storage unit . therefore , If Nginx Give the need to increase hash max size or hash bucket size A hint of , So the first thing is to increase the size of the previous parameter .
边栏推荐
- Uploading pictures on Alibaba cloud OSS
- Espressif plays with the compilation environment
- Form form
- Media at home and abroad publicize that we should strictly grasp the content
- Rocky基础练习题-shell脚本2
- Which of count (*), count (primary key ID), count (field) and count (1) in MySQL is more efficient? "Suggested collection"
- idea快捷键 alt实现整列操作
- MySQL 强化知识点
- JVM触发minor gc的条件
- Announcement | FISCO bcos v3.0-rc4 is released, and the new Max version can support massive transactions on the chain
猜你喜欢
垂直搜索
unity TopDown角色移动控制
QtCreator报错:You need to set an executable in the custom run configuration.
Media at home and abroad publicize that we should strictly grasp the content
多项式开根
Two tips for pycharm to open multiple projects
Probability model in machine learning
2022化工自动化控制仪表操作证考试题模拟考试平台操作
Zipkin安装和使用
day06 作业--技能题6
随机推荐
力扣链表题
Advanced mathematics | Takeshi's "classic series" daily question train of thought and summary of error prone points
JDBC database connection pool (Druid Technology)
Zipkin安装和使用
优秀的 Verilog/FPGA开源项目介绍(三十零)- 暴力破解MD5
760. 字符串长度
李沐d2l(六)---模型选择
MySQL 强化知识点
js闭包:函数和其词法环境的绑定
Codeworks DP collection
Numpy Foundation
Day06 homework -- skill question 2
Pytoch learning - from tensor to LR
Probability model in machine learning
Flask project learning (I) -- sayhello
高数 | 武爷『经典系列』每日一题思路及易错点总结
Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
tornado之多进程服务
2022流动式起重机司机考试题模拟考试题库模拟考试平台操作
对象型的集合按某个属性的值进行去重