nginx问题之nginx: could not build server_names_hash, you should increase server_names_hash_bucket_size解决方案
2018-01-08 09:37
701 查看
昨天在nginx上部署了一个网站后,发现访问不了,再去访问之前部署的网站,发现都访问不了了,去看下下nginx,发现nginx服务停止了,没有在运行,重启了下服务,发现还是一样,就去看了下nginx的日志,发下下面这样的提示:
看到什么server_names_hash_bucket_size之类的,我猜测是部署网站的时候,起的主机名称太长了,改小后果然,重启nginx,马上就好了。
解决方案:
edit the http{} nginx configuration:
The default value of
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
If a large number of server names are defined, and nginx complained with the following error
The hash bucket size parameter is aligned to the size that is a multiple of the processor’s cache line size
看到什么server_names_hash_bucket_size之类的,我猜测是部署网站的时候,起的主机名称太长了,改小后果然,重启nginx,马上就好了。
解决方案:
edit the http{} nginx configuration:
http { server_names_hash_bucket_size 64; ... }
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配置出错 could not build the server_names_hash, you should increase either server_names_hash_max_si
- 使用Nginx做反向代理时在error.log中出现server_names_hash_bucket_size大小不足问题的解决方案
- nginx “nginx could not build the server_names_hash”解决方法
- Nginx could not build the server_names_hash 错误的解决办法
- Nginx出现could not build the server_names_hash 解决办法
- Nginx 的 server_names_hash_bucket_size 问题
- Nginx 的 server_names_hash_bucket_size 问题
- nginx 虚拟主机多域名问题 【server_names_hash_bucket_size】
- nginx could not build the server_names_hash 解决方法
- Nginx: could not build the server_names_hash 解决办法
- Nginx could not build the server_names_hash 错误的解决办法
- Nginx:nginx could not build the server_names_hash解决办法
- Nginx: could not build the server_names_hash 解决办法
- Nginx 的 server_names_hash_bucket_size 问题
- nginx could not build the server_names_hash错误
- nginx报错”could not build the server_names_hash”
- nginx报could not build theproxy_headers_hash错误,无法启动
- nginx报Could not build the server_names_hash,server_names_hash_bucket_size:32错
- Nginx做负载均衡报:nginx: [emerg] could not build the types_hash
- 对于 Error:Could not find com.android.tools.build:gradle:3.0.0. 这种问题的解决方案