VPS侦探论坛

 找回密码
 注册
查看: 3705|回复: 2

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

[复制链接]
发表于 2018-5-24 11:41:47 | 显示全部楼层 |阅读模式

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

180524  7:27:14 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

180524 10:20:14 [Note] 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:14  InnoDB: 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:15  InnoDB: Waiting for the background threads to start
180524 10:20:16 InnoDB: 5.5.56 started; log sequence number 1799038894
180524 10:20:16 [Note] Recovering after a crash using mysql-bin
180524 10:20:28 [Note] Starting crash recovery...
180524 10:20:28 [Note] Crash recovery finished.
180524 10:20:28 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
180524 10:20:28 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
180524 10:20:28 [Note] Server socket created on IP: '0.0.0.0'.
180524 10:20:28 [Note] Event Scheduler: Loaded 0 events
180524 10:20:28 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.56-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution

无法重启mysql 报的啥错我不记得了,只能直接重启服务器后恢复
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-5-24 13:02:27 | 显示全部楼层


180524  7:27:14 InnoDB: Completed initialization of buffer pool
180524  7:27:14 InnoDB: Fatal error: cannot allocate memory for the buffer pool
按提示是无法分配内存,也就是内存不够用了,可能你其他程序占用较多
可以先调整/etc/my.conf 中 innodb_buffer_pool_size 调小些再观察看看
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-5-24 14:15:32 | 显示全部楼层

回复 2# 的帖子


谢谢军哥,我试试看看
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-24 03:23 , Processed in 0.025973 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表