nginx问题之nginx: could not build server_names_hash, you should increase server_names_hash_bucket_size解决方案
昨天在nginx上部署了一个网站后,发现访问不了,再去访问之前部署的网站,发现都访问不了了,去看下下nginx,发现nginx服务停止了,没有在运行,重启了下服务,发现还是一样,就去看了下nginx的日志,发下下面这样的提示:

看到什么server_names_hash_bucket_size之类的,我猜测是部署网站的时候,起的主机名称太长了,改小后果然,重启nginx,马上就好了。
解决方案:
edit the http{} nginx configuration:
http {
server_names_hash_bucket_size ;
...
}
- The default value of
server_names_hash_bucket_sizedepends on the size of the processor’s cache line - If a large number of server names are defined, or unusually long server names are defined, tuning the server_names_hash_max_size and server_names_hash_bucket_size directives at the http level may become necessary.
- If the default value of server_names_hash_bucket_size used at the server is not enough, means nginx complained with
could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32, the directive value should be increased to the next power of two (e.g. in this case to 64). - If a large number of server names are defined, and nginx complained with the following error
could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 32. try to set server_names_hash_max_size to a number close to the number of server names. Only if this does not help, or if nginx’s start time is unacceptably long, try to increase server_names_hash_bucket_size. - The hash bucket size parameter is aligned to the size that is a multiple of the processor’s cache line size
nginx问题之nginx: could not build server_names_hash, you should increase server_names_hash_bucket_size解决方案的更多相关文章
- nginx windows could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
nginx 为windows版本 在配置文件nginx.conf 的http{}段增加一行配置 server_names_hash_bucket_size 64; 如果64不够可以设128等
- 【记录】Nginx错误could not build the server_names_hash you should increase server_names_hash_bucket_size: 32
今天遇到这个错误,现记录下解决方案: 在nginx的配置文件的http段中增加如下配置: server_names_hash_bucket_size 64; 下面是nginx官方文档解释: 如果定义了 ...
- Cenos(6.6/7.1)下从源码安装Python+Django+uwsgi+nginx到写nginx的环境部署(一)
梳理下这几个的关系: centos是redhat的社区版操作系统. Python2.7.5是开发语言(centos6.5下自带的python是2.6.6版本,所以需要源码更新,而centos7.1下面 ...
- Master Nginx(1) - Installing Nginx and Third-Party Modules
Installing NGINX and Third-Party Modules Installing Nginx using a package manager Linux(deb-based) s ...
- 【夯实Nginx基础】Nginx工作原理和优化、漏洞
本文地址 原文地址 本文提纲: 1. Nginx的模块与工作原理 2. Nginx的进程模型 3 . NginxFastCGI运行原理 3.1 什么是 FastCGI ...
- Nginx 服务器 之Nginx与tomcat实现负载均衡
本文讲解我们如何使用Nginx做反向带服务器,实现nginx与tomcat服务器集群做负载均衡. 一.nginx与tomcat实现负载均衡 1.在/usr/local/ngnix/conf 创建 ...
- Nginx配置文件(nginx.conf)配置详解(2)
Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...
- Nginx配置文件(nginx.conf)配置详解
Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...
- Nginx配置配置文件nginx.conf的设置
引用自:http://www.ha97.com/5194.html #定义Nginx运行的用户和用户组user www www; #nginx进程数,建议设置为等于CPU总核心数.worker_pro ...
随机推荐
- angular2-模板驱动表单
app.module.ts 导入 FormsModule import { NgModule } from '@angular/core'; import { BrowserModule } fro ...
- Hyperledger Fabric SDK use case 1
///////////////////////////////////////////////////////////////////////:End2endAndBackAgainIT 1.Crea ...
- Exchange 域用户无权管理邮箱
将需要管理邮箱的域用户添加至“Microsoft Exchange Security Groups”用户组即可.
- MySQL命令行导入导出sql文件
linux下 一.导出数据库用mysqldump命令(注意mysql的安装路径,即此命令的路径):1.导出数据和表结构(常用):mysqldump -u用户名 -p密码 数据库名 > 数据库名. ...
- 在科技圈不懂“机器学习”?那你就out了
当联网的终端设备越来越多时,产生的信息数据也将呈指数式增长,大型.复杂.增长快速的数据收集已经无处不在.而机器学习能够扩增这些数据的价值,并基于这些趋势提出更广泛的应用情境. 那么,被人们津津乐道的机 ...
- Excel数据导入Sql Server,部分数字为Null
在Excel中,我们时常会碰到这样的字段(最常见的就是电话号码),即有纯数字的(如没有带区号的电话号码),又有数字和其它字符混合 (如“区号-电 话号码”)的数据,在导入SQLServer过程中,会发 ...
- Ubuntu 14.04默认以字符界面启动
在windows上跑虚拟机比较资源,特别当以图形界面启动时,如果宿主机性能不好,就相当卡. 让Ubuntu 14.04默认以字符界面启动的方法: 编辑文件:etc/default/grub 将 GR ...
- Oracle SYS用户无法设置session级别的read only
官方文档参考:SYSDBA is used internally in the Oracle database and has specialized functions. Its behavior ...
- SQA计划和测试规程
一.SQA计划 (一)目的 本计划的目的是定义我们该小组所做的“云医院”项目的SQA任务和职责,在项目过程中应遵循的流程.规范和约定等,以确保软件质量得到维持. (二)范围 本计划应用于“云医院”项目 ...
- python入门7 字符串操作
字符串操作 #coding:utf-8 #/usr/bin/python """ 2018-11-03 dinghanhua 字符串操作 ""&quo ...