Aliyun MySQL Aborting

Posted by Y Cheung on Thu, Dec 10, 2015

放了wordpress的主機最近經常掛掉,提示無法連結數據庫,檢查log信息發現是因為內存不足,把InnoDB的buffer pool size改小後似乎好了一些,可今天還是出錯了,log信息如下:

 1151210  6:45:23 [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.
 2151210  6:45:23 [Note] Plugin 'FEDERATED' is disabled.
 3151210  6:45:23 InnoDB: The InnoDB memory heap is disabled
 4151210  6:45:23 InnoDB: Mutexes and rw_locks use GCC atomic builtins
 5151210  6:45:23 InnoDB: Compressed tables use zlib 1.2.8
 6151210  6:45:23 InnoDB: Using Linux native AIO
 7151210  6:45:23 InnoDB: Initializing buffer pool, size = 96.0M
 8InnoDB: mmap(103022592 bytes) failed; errno 12
 9151210  6:45:23 InnoDB: Completed initialization of buffer pool
10151210  6:45:23 InnoDB: Fatal error: cannot allocate memory for the buffer pool
11151210  6:45:23 [ERROR] Plugin 'InnoDB' init function returned error.
12151210  6:45:23 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
13151210  6:45:23 [ERROR] Unknown/unsupported storage engine: InnoDB
14151210  6:45:23 [ERROR] Aborting

further search了一下,有建議說增加SWAP交換空間來解決。於是查看了本機swap空間情況,發現原來沒有…

好吧,那就增加一個SWAP空間試一段時間看看好了.

參考:Ubuntu修改swap交换空间