InnoDB: Cannot allocate memory for the buffer pool

来源:互联网 发布:日本犯罪推理知乎 编辑:程序博客网 时间:2024/05/01 15:55

Mysql今天又突然挂掉了,重启还是报昨天一样的错误
The server quit without updating PID file (/bak/local/mysql/var/file.pid).

错误日志如下:

2017-05-25 11:06:17 7119 [Note] Plugin 'FEDERATED' is disabled.2017-05-25 11:06:17 7119 [Note] InnoDB: Using atomics to ref count buffer pool pages2017-05-25 11:06:17 7119 [Note] InnoDB: The InnoDB memory heap is disabled2017-05-25 11:06:17 7119 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2017-05-25 11:06:17 7119 [Note] InnoDB: Memory barrier is not used2017-05-25 11:06:17 7119 [Note] InnoDB: Compressed tables use zlib 1.2.32017-05-25 11:06:17 7119 [Note] InnoDB: Using CPU crc32 instructions2017-05-25 11:06:17 7119 [Note] InnoDB: Initializing buffer pool, size = 1G2017-05-25 11:06:17 7119 [Note] InnoDB: Completed initialization of buffer pool2017-05-25 11:06:17 7119 [Note] InnoDB: Highest supported file format is Barracuda.2017-05-25 11:06:17 7119 [Note] InnoDB: The log sequence numbers 209542352 and 209542352 in ibdata files do not match the log sequence number 370455677 in the ib_logfiles!2017-05-25 11:06:17 7119 [Note] InnoDB: Database was not shutdown normally!2017-05-25 11:06:17 7119 [Note] InnoDB: Starting crash recovery.2017-05-25 11:06:17 7119 [Note] InnoDB: Reading tablespace information from the .ibd files...2017-05-25 11:06:18 7119 [Note] InnoDB: Restoring possible half-written data pages 2017-05-25 11:06:18 7119 [Note] InnoDB: from the doublewrite buffer...InnoDB: Last MySQL binlog file position 0 243283, file name mysql-bin.0000112017-05-25 11:06:18 7119 [Note] InnoDB: 128 rollback segment(s) are active.2017-05-25 11:06:18 7119 [Note] InnoDB: Waiting for purge to start2017-05-25 11:06:18 7119 [Note] InnoDB: 5.6.29 started; log sequence number 3704556772017-05-25 11:06:18 7119 [Note] Recovering after a crash using mysql-bin2017-05-25 11:06:18 7119 [Note] Starting crash recovery...2017-05-25 11:06:18 7119 [Note] Crash recovery finished.2017-05-25 11:06:18 7119 [Note] Server hostname (bind-address): '*'; port: 33062017-05-25 11:06:18 7119 [Note] IPv6 is not available.2017-05-25 11:06:18 7119 [Note]   - '0.0.0.0' resolves to '0.0.0.0';2017-05-25 11:06:18 7119 [Note] Server socket created on IP: '0.0.0.0'.2017-05-25 11:06:18 7119 [Note] Event Scheduler: Loaded 0 events

昨天是将innodb_buffer_pool_size从512M加大到了1024M,看来并没有从根本上解决问题。
试着重启了多次还是不管用。

报出以下错误:

2017-05-25 11:38:29 13565 [ERROR] InnoDB: Cannot allocate memory for the buffer pool2017-05-25 11:38:29 13565 [ERROR] Plugin 'InnoDB' init function returned error.2017-05-25 11:38:29 13565 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.2017-05-25 11:38:29 13565 [ERROR] Unknown/unsupported storage engine: INNODB2017-05-25 11:38:29 13565 [ERROR] Aborting

说无法分配内存缓冲池

然后用free命令查看了一下可用内存只有1百多M,果断将目前服务器上不用的tomcat给kill掉,然后重启成功。
并且将 my.cnf 中的innodb_buffer_pool_size修改为512M。

my.cnf以下配置是禁示innodb的参数,如果是开启只需要注释掉即可,目前默
例如:

#loose-innodb-trx=0#loose-innodb-locks=0#loose-innodb-lock-waits=0#loose-innodb-cmp=0#loose-innodb-cmp-per-index=0#loose-innodb-cmp-per-index-reset=0#loose-innodb-cmp-reset=0#loose-innodb-cmpmem=0#loose-innodb-cmpmem-reset=0#loose-innodb-buffer-page=0#loose-innodb-buffer-page-lru=0#loose-innodb-buffer-pool-stats=0#loose-innodb-metrics=0#loose-innodb-ft-default-stopword=0#loose-innodb-ft-inserted=0#loose-innodb-ft-deleted=0#loose-innodb-ft-being-deleted=0#loose-innodb-ft-config=0#loose-innodb-ft-index-cache=0#loose-innodb-ft-index-table=0#loose-innodb-sys-tables=0#loose-innodb-sys-tablestats=0#loose-innodb-sys-indexes=0#loose-innodb-sys-columns=0#loose-innodb-sys-fields=0#loose-innodb-sys-foreign=0#loose-innodb-sys-foreign-cols=0
阅读全文
0 0