Nginx做负载均衡报:nginx: [emerg] could not build the types_hash
2013-10-29 11:26
369 查看
环境:KVM/Centos6.3
用Nginx做负载均衡的时候在配置完成后,启动Nginx的时候报:
#################################################
I found out nginx is reporting the wrong cache line size on a virtual system.
On startup it reports:
Restarting nginx: nginx: [emerg] could not build the types_hash, you should
increase either types_hash_max_size: 1024 or types_hash_bucket_size: 32
This is caused by /etc/nginx/mime.types having a key which is 36 bytes long:
echo -n application/vnd.google-earth.kml+xml |wc -c
36
In src/core/ngx_cpuinfo.c , the ngx_cpuinfo() reports my CPU has having a 32 bytes cache line which is then used as the default value for types_hash_bucket_size and thus trigger the startup error.
本文出自 “此身 此时 此地” 博客,请务必保留此出处http://jqbash.blog.51cto.com/7172316/1316658
用Nginx做负载均衡的时候在配置完成后,启动Nginx的时候报:
nginx: [emerg] could not build the types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 32解决方法:在nginx配置文件http模块添加:types_hash_max_size 2048;
http{ include mime.types; default_type application/octet-stream; types_hash_max_size 2048; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k;错误原因真心不知道,只能Google了,方法找到了,错误原因也找到了,但真心不明白什么意思。
#################################################
I found out nginx is reporting the wrong cache line size on a virtual system.
On startup it reports:
Restarting nginx: nginx: [emerg] could not build the types_hash, you should
increase either types_hash_max_size: 1024 or types_hash_bucket_size: 32
This is caused by /etc/nginx/mime.types having a key which is 36 bytes long:
echo -n application/vnd.google-earth.kml+xml |wc -c
36
In src/core/ngx_cpuinfo.c , the ngx_cpuinfo() reports my CPU has having a 32 bytes cache line which is then used as the default value for types_hash_bucket_size and thus trigger the startup error.
本文出自 “此身 此时 此地” 博客,请务必保留此出处http://jqbash.blog.51cto.com/7172316/1316658
相关文章推荐
- 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 解决方法
- nginx报could not build theproxy_headers_hash错误,无法启动
- Nginx: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: could not build the server_names_hash 解决办法
- 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 server_names_hash, you should increase server_names_hash_bucket_size解决方案
- nginx报错”could not build the server_names_hash”
- qt4.7中Could not find make command: mingw32-make.exe in the build environment的解决办法
- Unable to read the project file 'client.csproj'. Could not load file or assembly 'Microsoft.Build.En
- 错误:Could not create the Android package. See the Output (Build) window for more details
- nginx+Apache+squid出现error the requested URL could not be retrieved
- 启动nginx服务提示 nginx: [emerg] still could not
- vc++ "Error spawning 'vcspawn.exe'. The build could not be performed" 错误解决办法 (测试通过)
- Could not find make command: mingw32-make.exe in the build environment问题详细解答