Mysqld本身closures

我正在运行一个获得中等stream量的WordPress博客。 它被托pipe在一个Ubuntu服务器2GB内存2核心处理器40GB SSD磁盘,3TB传输。

问题是MySQL在一两个小时后自行closures。 每次发生这种情况,我都必须重新启动mysql。 我检查了日志,这是我发现:

140612 6:48:14 [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. 140612 6:48:14 [Note] Plugin 'FEDERATED' is disabled. 140612 6:48:14 InnoDB: The InnoDB memory heap is disabled 140612 6:48:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140612 6:48:14 InnoDB: Compressed tables use zlib 1.2.3.4 140612 6:48:14 InnoDB: Initializing buffer pool, size = 1.4G InnoDB: mmap(1502412800 bytes) failed; errno 12 140612 6:48:14 InnoDB: Completed initialization of buffer pool 140612 6:48:14 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140612 6:48:14 [ERROR] Plugin 'InnoDB' init function returned error. 140612 6:48:14 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140612 6:48:14 [ERROR] Unknown/unsupported storage engine: InnoDB 140612 6:48:14 [ERROR] Aborting 140612 6:48:14 [Note] /usr/sbin/mysqld: Shutdown complete 

由这条线来判断:

 140612 6:48:14 InnoDB: Fatal error: cannot allocate memory for the buffer pool 

我怀疑这是一个记忆问题,但我想在这里结束之前听取专家的意见。

这是一个内存不足的问题? 你认为my.cnf (目前是100)中的max_connections的价值是否是一个潜在的原因,并且需要增加?

TIA。

它看起来像你的系统内存不足,错误号12是内核报告ENOMEM。 你应该检查你的其他日志,看看是否有任何其他相关的信息可以帮助你诊断。 安装一些监控也是有用的,这样也可以收集系统上的信息。