centos Cannot allocate memory for the buffer pool
Posted lavin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos Cannot allocate memory for the buffer pool相关的知识,希望对你有一定的参考价值。
mysql 无法启动 ,查看日志:
17-10-01T15:37:27.401599Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-10-01T15:37:27.403209Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.19) starting as process 5504 ... 2017-10-01T15:37:27.406004Z 0 [Note] InnoDB: PUNCH HOLE support available 2017-10-01T15:37:27.406028Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2017-10-01T15:37:27.406032Z 0 [Note] InnoDB: Uses event mutexes 2017-10-01T15:37:27.406035Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2017-10-01T15:37:27.406038Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2017-10-01T15:37:27.406041Z 0 [Note] InnoDB: Using Linux native AIO 2017-10-01T15:37:27.406290Z 0 [Note] InnoDB: Number of pools: 1 2017-10-01T15:37:27.406379Z 0 [Note] InnoDB: Using CPU crc32 instructions 2017-10-01T15:37:27.407775Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2017-10-01T15:37:27.407813Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12 2017-10-01T15:37:27.407819Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool 2017-10-01T15:37:27.407824Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2017-10-01T15:37:27.407829Z 0 [ERROR] Plugin ‘InnoDB‘ init function returned error. 2017-10-01T15:37:27.407832Z 0 [ERROR] Plugin ‘InnoDB‘ registration as a STORAGE ENGINE failed. 2017-10-01T15:37:27.407834Z 0 [ERROR] Failed to initialize plugins. 2017-10-01T15:37:27.407836Z 0 [ERROR] Aborting 2017-10-01T15:37:27.407852Z 0 [Note] Binlog end 2017-10-01T15:37:27.407890Z 0 [Note] Shutting down plugin ‘CSV‘ 2017-10-01T15:37:27.408059Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
定位到最后几行,果然有一个FATAL ERROR:Cannot allocate memory for the buffer pool,看来应该是mariadb没有配置好,php程序访问量稍微大一些,分配给mariadb的内存就满了,然后就锁死了,mysql –u root –p竟然也打不开,看来确实是mariadb daemon挂掉了…
以上是关于centos Cannot allocate memory for the buffer pool的主要内容,如果未能解决你的问题,请参考以下文章
zabbix登陆问题:cannot allocate shared memory for collector
zabbix问题:cannot allocate shared memory of size
Mysql自动宕机:InnoDB: Cannot allocate memory for the buffer pool
关于阿里云ESC上go语言项目编译6l: running gcc failed: Cannot allocate memory