服务器内存不足Mysql启动错误记录

错误日志如下

2017-08-09 18:07:23 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.33-log) starting as process 16755 ...
2017-08-09 18:07:23 16755 [Note] Plugin 'FEDERATED' is disabled.
2017-08-09 18:07:23 16755 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-08-09 18:07:23 16755 [Note] InnoDB: The InnoDB memory heap is disabled
2017-08-09 18:07:23 16755 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-08-09 18:07:23 16755 [Note] InnoDB: Memory barrier is not used
2017-08-09 18:07:23 16755 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-08-09 18:07:23 16755 [Note] InnoDB: Using CPU crc32 instructions
2017-08-09 18:07:23 16755 [Note] InnoDB: Initializing buffer pool, size = 256M
InnoDB: mmap(137363456 bytes) failed; errno 12
2017-08-09 18:07:23 16755 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-08-09 18:07:23 16755 [ERROR] Plugin 'InnoDB' init function returned error.
2017-08-09 18:07:23 16755 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-08-09 18:07:23 16755 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-08-09 18:07:23 16755 [ERROR] Aborting

主要原因是服务器内存不足导致启动失败

查看内存命令
free -m
free显示当前内存的使用情况,-m表示M字节来显示内容

             total       used       free     shared    buffers     cached
Mem:          3832       3686        146          0        188        100
-/+ buffers/cache:       3397        435
Swap:            0          0          0

第一部分Mem行:
total 内存总数: 3832M
used 已经使用的内存数: 3686M
free 空闲的内存数: 146M
shared 当前已经废弃不用,总是0
buffers Buffer缓存内存数: 188M
cached Page缓存内存数:100M
关系:total(3832M) = used(3686M) + free(146M)

第二部分(-/+ buffers/cache):
(-buffers/cache) used内存数:3397M (指的第一部分Mem行中的used – buffers – cached)
(+buffers/cache) free内存数: 435M (指的第一部分Mem行中的free + buffers + cached)

-buffers/cache反映的是被程序实实在在吃掉的内存
+buffers/cache反映的是可以挪用的内存总数

第三部分是指交换分区

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值