MySQL InnoDB:mmap(137363456字节)失败; errno 12

时间:2016-05-03 20:27:09

标签: php mysql wordpress amazon-ec2

问题始于Amazon EC2微型实例(1 GB ram),运行Wordpress网站。

我在互联网上尝试了几种解决方案但未能解决问题。

这是我的MySQL错误日志:

160503 19:49:22 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 24829 ...
160503 19:49:22 [Note] Plugin 'FEDERATED' is disabled.
160503 19:49:22 InnoDB: The InnoDB memory heap is disabled
160503 19:49:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160503 19:49:22 InnoDB: Compressed tables use zlib 1.2.8
160503 19:49:22 InnoDB: Using Linux native AIO
160503 19:49:25 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160503 19:49:25 InnoDB: Completed initialization of buffer pool
160503 19:49:25 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160503 19:49:25 [ERROR] Plugin 'InnoDB' init function returned error.
160503 19:49:25 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160503 19:49:25 [ERROR] Unknown/unsupported storage engine: InnoDB
160503 19:49:25 [ERROR] Aborting

160503 19:49:27 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete

160503 19:49:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

错误表明我的服务器没有足够的内存。

错误日志与此类似:Amazon EC2, mysql aborting start because InnoDB: mmap (x bytes) failed; errno 12

我尝试创建交换文件,重新启动了mysql服务器,结果是它只花了2~分钟才崩溃。

我决定用4 GB RAM创建一个中型实例。我启动服务器,点击4~5页后,MySQL数据库崩溃的方式相同,但错误相同。

最后一次Wordpress(4.5.1)更新更改了数据库,不确定它是否可能相关...

有什么建议吗?

0 个答案:

没有答案