InnoDB memory heap is disabled in mySQL is an annoying issue that occurs pretty often when you install mySQL on Amazon EC2 server, especially when you use it for WordPress. Let’s now look at why this error happens and how we could trouble shoot it.
Why the error happens?
The error mainly happens due to the insufficient memory on the heap for the mySQL on EC2. The Amazon EC2’s micro instance gives us just 613MB of memory and mySQL can’t take all of the memory for itself.
How to kill this issue?
The solution that works best is to create a swap memory for mySQL and allow the applications to take advantage of that. Here’s how to do that:
- Login into your instance from Terminal or Command Prompt via SSH.
- Now, switch to Root mode (Sudo su)
- Run the following command: dd if=/dev/zero of=/swapfile bs=1M count=1024
- Make a swap file by running: mkswap /swapfile
- Turn on Swap Files: swapon /swapfile
And that’s it. You’re done. To monitor your Swap file size and free space, just type swapon -s.
Hope this helps.