mysql在阿里云崩溃的问题

mysql阿里云 崩溃 自动关闭了 搜索后又不少类似的问题日志如下

140211 14:40:41 mysqld_safe Number of processes running now: 0
140211 14:40:41 mysqld_safe mysqld restarted
140211 14:40:41 InnoDB: The InnoDB memory heap is disabled
140211 14:40:41 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140211 14:40:41 InnoDB: Compressed tables use zlib 1.2.3
140211 14:40:41 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140211 14:40:41 InnoDB: Completed initialization of buffer pool
140211 14:40:41 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140211 14:40:41 [ERROR] Plugin ‘InnoDB’ init function returned error.
140211 14:40:41 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
140211 14:40:41 [ERROR] Unknown/unsupported storage engine: InnoDB
140211 14:40:41 [ERROR] Aborting

140211 14:40:41 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140211 14:40:42 mysqld_safe mysqld from pid file /data/mysql/localhost.localdomain.pid ended

本机没使用innodb,感觉和内存有关,阿里云是建立不要创建swap的 ,个人感觉是内存不够调用不到swap导致的,猜测而已
自己先建立一个swap重启后正常运行。

添加swap分区的步骤:

1) dd if=/dev/zero of=/var/swapfile bs=1M count=1024
2) mkswap /var/swapfile
3) swapon /var/swapfile
4) 添加这行: /var/swapfile swap swap defaults 0 0 到 /etc/fstab

运行7天没有关闭,还有待观察观察!

 

此条目发表在数据库分类目录,贴了, , 标签。将固定链接加入收藏夹。

发表评论