我有MySQL的这个错误日志,任何想法?网站工作了一段时间,然后我在几个小时后完全关闭了MySQL.
140919 10:48:27 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140919 10:48:27 [Note] Plugin 'FEDERATED' is disabled.
140919 10:48:27 InnoDB: The InnoDB memory heap is disabled
140919 10:48:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140919 10:48:27 InnoDB: Compressed tables use zlib 1.2.3.4
140919 10:48:28 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140919 10:48:28 InnoDB: Completed initialization of buffer pool
140919 10:48:28 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140919 10:48:28 [ERROR] Plugin 'InnoDB' init function returned error.
140919 10:48:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140919 10:48:28 [ERROR] Unknown/unsupported storage engine: InnoDB
140919 10:48:28 [ERROR] Aborting
140919 10:48:28 [Note] /usr/sbin/mysqld: Shutdown complete
140919 10:48:28 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140919 10:48:28 [Note] Plugin 'FEDERATED' is disabled.
140919 10:48:28 InnoDB: The InnoDB memory heap is disabled
140919 10:48:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140919 10:48:28 InnoDB: Compressed tables use zlib 1.2.3.4
140919 10:48:28 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140919 10:48:28 InnoDB: Completed initialization of buffer pool
140919 10:48:28 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140919 10:48:28 [ERROR] Plugin 'InnoDB' init function returned error.
140919 10:48:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140919 10:48:28 [ERROR] Unknown/unsupported storage engine: InnoDB
140919 10:48:28 [ERROR] Aborting
140919 10:48:28 [Note] /usr/sbin/mysqld: Shutdown complete
Run Code Online (Sandbox Code Playgroud)
pti*_*tim 58
Mysql无法重启,因为内存不足,请检查您是否配置了适当的交换文件.
没帮忙?如果这不是您的问题,那么继续研究的更多合格问题是:
我在EC2上设置的第一个系统上遇到了这个问题,其特点是托管的wordpress站点偶尔会出现"建立数据库连接错误".
日志显示OP发布的相同错误.我读错误(删除时间戳)是:
InnoDB: Fatal error: cannot allocate memory for the buffer pool
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
[Note] /usr/sbin/mysqld: Shutdown complete
检查/var/log/syslog和搜索mysql产生:
Out of memory: Kill process 15452 (mysqld) score 93 or sacrifice child
Killed process 15452 (mysqld) total-vm:888672kB, anon-rss:56252kB, file-rss:0kB
init: mysql main process (15452) killed by KILL signal
init: mysql main process ended, respawning
type=1400 audit(1443812767.391:30): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=21984 comm="apparmor_parser"
init: mysql main process (21996) terminated with status 1
init: mysql main process ended, respawning
init: mysql post-start process (21997) terminated with status 1
<repeated>
Run Code Online (Sandbox Code Playgroud)
注意:如果在cron轮换日志之前发生错误,您可能需要进行gunzip并搜索存档日志.
在我的情况下,潜在的问题是我忽略了配置交换文件.
您可以检查是否通过运行配置了一个free -m.
total used free shared buffers cached
Mem: 604340 587364 16976 0 29260 72280
-/+ buffers/cache: 485824 118516
Swap: 0 0 0
在上面的示例中,Swap:0表示没有交换文件.
设置一个教程:
注意,更大不一定更好! 来自Ubuntu指南:
"收益递减"意味着如果您需要的交换空间超过RAM大小的两倍,您最好添加更多RAM,因为硬盘驱动器(HDD)访问速度比RAM访问速度慢大约10 3,因此需要1秒钟,突然需要超过15分钟!在快速固态硬盘(SSD)上还有一分钟......
The InnoDB memory heap is disabled这不是一个真正的错误,只是表明InnoDB正在使用系统的内部内存分配器而不是它自己的内存.默认值为yes/1,可以接受生产.
根据文档,这个命令已被弃用,并将在5.6以上的MySQL版本中删除(我假设MariaDB):
http://dev.mysql.com/doc/refman/5.6/en/innodb-performance-use_sys_malloc.html
[Note] Plugin 'FEDERATED' is disabled.有关FEDERATED禁用的消息不是错误.它只是意味着FEDERATED引擎对你的mysql服务器不开启.它默认不使用.如果您不需要它,请不要关心此消息.
请参阅:https://stackoverflow.com/a/16470822/2586761
| 归档时间: |
|
| 查看次数: |
50570 次 |
| 最近记录: |