nginx: [alert] mmap(MAP_ANON|MAP_SHARED, 536870912) failed (12: Cannot allocate memory)解决方法
来源:互联网 发布:js获取svg元素属性值 编辑:程序博客网 时间:2024/05/17 18:02
今天进行Nginx反向代理,用nginx -t测试配置文件是否正常时出现如下错误:
nginx: [alert] mmap(MAP_ANON|MAP_SHARED, 524288000) failed (12: Cannot allocate memory)nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed内存映射无法完成,共享内存无法分配~查看配置文件,找到这一句:
proxy_cache_path /usr/local/nginx/proxy_cache_path levels=1:2 keys_zone=cache_one:500m inactive=1d max_size=20g;这里设置反向代理缓存区名称为 cache_one,内存大小 500M,自动清除超过一天未被访问的缓存数据,硬盘缓存空间大小 20G。问题就出在这里,内存设置过大。修改500m为300m即可不出现报错。
0 0
- nginx: [alert] mmap(MAP_ANON|MAP_SHARED, 536870912) failed (12: Cannot allocate memory)解决方法
- mprotect() failed: Cannot allocate memory
- mysql:failed,启动失败,mmap failed-Cannot allocate memory for the buffer pool
- Ubuntu mount error(12): Cannot allocate memory 的解决方法
- mount cifs出现cannot allocate memory解决方法
- kafka 容器报内存不足异常(failed; error='Cannot allocate memory' (errno=12))
- mount error 12 = Cannot allocate memory
- mount error 12 = Cannot allocate memory
- mount error(12): Cannot allocate memory解决办法
- TIP: system errno 12 Cannot allocate memory
- kali linux ERROR 12 Cannot allocate memory
- Android cannot allocate memory
- Mysql cannot allocate memory for the buffer pool 解决方法
- Failed to allocate memory: 8原因及解决方法
- [android Emulator] Failed to allocate memory: 8 解决方法
- swapoff错误Cannot allocate memory
- linux java Cannot allocate memory
- error='Cannot allocate memory'
- Qt编码风格
- (驱动)简单定时器编写练习(2014/8/23)
- 取消Linux下VIM和gedit的自动备份功能
- 互联网时代的四个关键词
- 一个很难明白的题目
- nginx: [alert] mmap(MAP_ANON|MAP_SHARED, 536870912) failed (12: Cannot allocate memory)解决方法
- 自实现json解析库
- POJ 3169 Layout (差分约束系统)
- android系统的分区结构
- 徜徉在宋词里的女子
- ”树莓派“安装libjpeg库
- PAT 1004 Counting Leaves
- 【android】编程规范、常用技巧和性能优化
- Java排序算法(一):概述