Report this

What is the reason for this report?

mysql crashes have to be restarted for it to work

Posted on July 8, 2014

Hey guys, i have a cloud 20GB plan its setup with nignx server and i have just one website hosted over it.

Its a wordpress based website and uses mysql for db. The traffic is not much just 200 to 500 visitors per day.

Its been 2 weeks (a little more) and mysql has crashed 3-4 times so far. Now i am bit worried about it as its a site which deals with e-comm hence i want to find a solution and a reason for it.

here is the error log:

140707 23:37:13 mysqld_safe Number of processes running now: 0
140707 23:37:13 mysqld_safe mysqld restarted
140707 23:37:13 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be rem
oved in a future release. Please use the full name instead.
140707 23:37:13 [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.
140707 23:37:13 [Note] Plugin 'FEDERATED' is disabled.
140707 23:37:13 InnoDB: The InnoDB memory heap is disabled
140707 23:37:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140707 23:37:13 InnoDB: Compressed tables use zlib 1.2.8
140707 23:37:13 InnoDB: Using Linux native AIO
140707 23:37:13 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140707 23:37:13 InnoDB: Completed initialization of buffer pool
140707 23:37:13 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140707 23:37:13 [ERROR] Plugin 'InnoDB' init function returned error.
140707 23:37:13 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140707 23:37:13 [ERROR] Unknown/unsupported storage engine: InnoDB
140707 23:37:13 [ERROR] Aborting

140707 23:37:13 [Note] /usr/sbin/mysqld: Shutdown complete

140707 23:37:13 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140707 23:56:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

Its crashed on 23:37 and i restarted it on 23:56 thats 19 mins of down time :(



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The key error here is:

140707 23:37:13 InnoDB: Fatal error: cannot allocate memory for the buffer pool

This crash is due to your system running out of memory. I’d suggest that you add a swap file to give yourself a bit more of a buffer. Check out this tutorial:

How To Add Swap on Ubuntu 14.04

same thing happening with websites also…

Thanks Andrew for that helpfull tutorial, if in case i have to increase the memory how much should i increase? and can i just increase the RAM size of the vps?

P.S i dont get any notification when you post answer on this should i get it or i have to enable any option?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.