Chinaunix首页 | 论坛 | 博客
  • 博客访问: 104211
  • 博文数量: 21
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 223
  • 用 户 组: 普通用户
  • 注册时间: 2016-02-18 09:51
文章分类

全部博文(21)

文章存档

2016年(21)

我的朋友

分类: LINUX

2016-07-04 16:54:04

在ECS实例上运行了博客网站上面有 tomcat  redis  nginx  mysql  但是内存有限,导致内核进程终结者 终结掉了mysql进程,然后启动mysql 就开始报错,无法启动

经过查找资料,发现有很多初级的解决办法,例如删除/etc/my.cnf   初始化数据库  指定datadir路径等等。都是复制来复制去的 千篇一律
首先查看日志吧:

点击(此处)折叠或打开

  1. 2016-07-04 09:55:55 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.28) starting as process 24460 ...
  2. 2016-07-04 09:55:55 24460 [Note] Plugin 'FEDERATED' is disabled.
  3. 2016-07-04 09:55:55 24460 [Note] InnoDB: Using atomics to ref count buffer pool pages
  4. 2016-07-04 09:55:55 24460 [Note] InnoDB: The InnoDB memory heap is disabled
  5. 2016-07-04 09:55:55 24460 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  6. 2016-07-04 09:55:55 24460 [Note] InnoDB: Memory barrier is not used
  7. 2016-07-04 09:55:55 24460 [Note] InnoDB: Compressed tables use zlib 1.2.3
  8. 2016-07-04 09:55:55 24460 [Note] InnoDB: Using CPU crc32 instructions
  9. 2016-07-04 09:55:55 24460 [Note] InnoDB: Initializing buffer pool, size = 128.0M
  10. InnoDB: mmap(137363456 bytes) failed; errno 12
  11. 2016-07-04 09:55:55 24460 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
  12. 2016-07-04 09:55:55 24460 [ERROR] Plugin 'InnoDB' init function returned error.
  13. 2016-07-04 09:55:55 24460 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  14. 2016-07-04 09:55:55 24460 [ERROR] Unknown/unsupported storage engine: InnoDB
  15. 2016-07-04 09:55:55 24460 [ERROR] Aborting

排查办法:


点击(此处)折叠或打开

  1. [root@dfd data]# free -m
  2. total used free shared buffers cached
  3. Mem: 994 597 397 2 5 40
  4. -/+ buffers/cache: 551 443
  5. Swap: 0 0 0

解决办法:
修改my.cnf
innodb_buffer_pool_size=28M即可


Buffuers不足初始化失败!

阅读(2032) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~