I'm running a Wordpress Blog that gets medium-high traffic. It is hosted in an Ubuntu Server 2GB Memory 2 Core Processor 40GB SSD Disk, 3TB Transfer.

The problem is that MySQL shuts down by itself after an hour or two. I had to restart mysql each and every time this happens. I checked the logs and this is what I found:

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
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

judging by this line:

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

I suspect that this is a memory problem, but I would like to hear from the experts here before I conclude.

Is this a lack of memory problem? Do you think the value of max_connections in my.cnf (currently 100) is a potential cause and needs increasing?


  • run mysqltuner.com and see whats going on. probably it is not only max_connections, other values too, but dont forget about LAMP stack and system memory too – ADM Jun 12 '14 at 10:22

It looks like your system ran out of memory, error number 12 is the kernel reporting ENOMEM. You should check your other logs to see if there are any other relevant related messages that may help you to diagnose this. It may also be useful to install some monitoring so that yiu can gather information on the system too.

  • thanks! could you suggest a monitoring software for me? I'm also considering that the server is being "attacked". – AJ Naidas Jun 13 '14 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.