lovinlik 发表于 2018-5-24 11:41:47

lnmp discuz3.4每隔几天mysql就会2002连不上 cannot allocate memory for the buffer pool 军哥看下

错误日志
Version: '5.5.56-log'socket: '/tmp/mysql.sock'port: 3306Source distribution
1805247:27:14 Plugin 'FEDERATED' is disabled.
1805247:27:14 InnoDB: The InnoDB memory heap is disabled
1805247:27:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
1805247:27:14 InnoDB: Compressed tables use zlib 1.2.3
1805247:27:14 InnoDB: Initializing buffer pool, size = 256.0M
InnoDB: mmap(274726912 bytes) failed; errno 12
1805247:27:14 InnoDB: Completed initialization of buffer pool
1805247:27:14 InnoDB: Fatal error: cannot allocate memory for the buffer pool
1805247:27:14 Plugin 'InnoDB' init function returned error.
1805247:27:14 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
1805247:27:14 Unknown/unsupported storage engine: InnoDB
1805247:27:14 Aborting

1805247:27:14 /usr/local/mysql/bin/mysqld: Shutdown complete

180524 10:20:14 Plugin 'FEDERATED' is disabled.
180524 10:20:14 InnoDB: The InnoDB memory heap is disabled
180524 10:20:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180524 10:20:14 InnoDB: Compressed tables use zlib 1.2.3
180524 10:20:14 InnoDB: Initializing buffer pool, size = 256.0M
180524 10:20:14 InnoDB: Completed initialization of buffer pool
180524 10:20:14 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
180524 10:20:14InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 671580266, file name ./mysql-bin.000019
180524 10:20:15InnoDB: Waiting for the background threads to start
180524 10:20:16 InnoDB: 5.5.56 started; log sequence number 1799038894
180524 10:20:16 Recovering after a crash using mysql-bin
180524 10:20:28 Starting crash recovery...
180524 10:20:28 Crash recovery finished.
180524 10:20:28 Server hostname (bind-address): '0.0.0.0'; port: 3306
180524 10:20:28    - '0.0.0.0' resolves to '0.0.0.0';
180524 10:20:28 Server socket created on IP: '0.0.0.0'.
180524 10:20:28 Event Scheduler: Loaded 0 events
180524 10:20:28 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.56-log'socket: '/tmp/mysql.sock'port: 3306Source distribution

无法重启mysql 报的啥错我不记得了,只能直接重启服务器后恢复

licess 发表于 2018-5-24 13:02:27

1805247:27:14 InnoDB: Completed initialization of buffer pool
1805247:27:14 InnoDB: Fatal error: cannot allocate memory for the buffer pool
按提示是无法分配内存,也就是内存不够用了,可能你其他程序占用较多
可以先调整/etc/my.conf 中 innodb_buffer_pool_size 调小些再观察看看

lovinlik 发表于 2018-5-24 14:15:32

回复 2# 的帖子

谢谢军哥,我试试看看
页: [1]
查看完整版本: lnmp discuz3.4每隔几天mysql就会2002连不上 cannot allocate memory for the buffer pool 军哥看下