Question

Ubuntu WP Crashing: [ERROR] Unknown/unsupported storage engine: InnoDB

Posted December 29, 2013 18.9k views
This seems to be what is causing my droplet to crash. It's located at http://dexterauction.com Ubuntu WP Crashing: [ERROR] Unknown/unsupported storage engine: InnoDB Keeps appearing in the MySQL logs whenever it crashes. I already have 2GB memory so it's not a memory issue. Tried changing it to MySIAM, which didn't help. You can check logs here: http://pastebin.com/JkFKj9z8

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.

×
13 answers
131227  9:09:22 InnoDB: Fatal error: cannot allocate memory for the buffer pool

It's running out of memory. Try stopping MySQL and running
free -m
What does that command output?

Try adding swap: https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04.
by Etel Sverdlov
Linux swaps allow a system to harness more memory than was originally physically available. Here's how to set up a linux swap file on Ubuntu 12.04
Which web server are you using? Apache or Nginx?
Hi Kamal, Currently, 1.1GB free with MySQL enabled so I don't think is a permanent fix or an efficient one. Pablo, Apache.
How much traffic do you get? Apache uses up a lot of memory if there are a lot of concurrent connections.

Did you add swap to your droplet?
It can range from 200 visitors to a thousand each day, but that may increase soon. 2GB of memory should be plenty for that type of traffic though. What amount of memory would you recommend for 10,000 visitors/day?
That depends on a lot of factors: the webserver you are using, the app you're running, the database engine you're running (check out https://www.digitalocean.com/community/articles/switching-to-mariadb-from-mysql), the load on your droplet, etc.

Apache seems to be using a lot of memory so try switching to nginx instead:
https://www.digitalocean.com/community/articles/how-to-migrate-from-an-apache-web-server-to-nginx-on-an-ubuntu-vps
by Etel Sverdlov
Have you been thinking of making the switch? Here's our article on moving from from MySQL to MariaDB.
"2GB of memory should be plenty for that type of traffic though."

Wrong. Even users on Amazon Web Services have experienced the same problem as you with Apache running on a 2 GB VPS. Dump Apache (like the inventors of WordPress did in 2008) and go with Nginx.
I have the same problem as you. so nginx is the solution?
Your problem has nothing to do with Apache (though it can hog memory). If you're not using innoDB, it doesn't need to be loaded in, and it will cause memory problems if it is.

1. Find your my.cnf file (the MySQL config). It will live in /etc/mysql/my.conf or in /etc/my.conf

2. Assuming you are using myisam, add these two lines:

default-storage-engine=myisam
skip_innodb

3. Restart mysql: sudo service mysqld restart

90% of the time that will fix it. If not, let us know and there are some other edge cases that could be tried.

Just installed the LAMP stack on Ubuntu 14 and having the same problem, MySQL don’t restart, same error.. after some googling it worked for me:

service mysql stop
service mysql start

This worked for me :)

The easiest process is to log on to PUTTY and run the code

“sudo service mysql restart” without inverted commas

Thanks

ken555452,

But what if we were already using innodb as the storage? Changing it to myisam as you suggested works but my wordpress installation is lost and I have to reinstall from scratch. Obviously, not a good thing.

I’m using mysql 5.5 and after some recent Debian updates, I’m getting the same error as mooalguide.

Hello, all

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

What you can also do is to use the MySQLTuner script.

The MySQLTuner is a script written in Perl and allows you to quickly test your MySQL configuration and it gives you suggestions for adjustments to increase performance and stability.

According to the official GitHub page, it supports 300 indicators for MySQL/MariaDB/Percona Server in this last version.

To run the script you could do the following:

  • SSH to your Droplet
  • Download the script:
wget http://mysqltuner.pl/ -O mysqltuner.pl
  • Then execute it:
perl mysqltuner.pl

The script would run multiple checks against your MySQL instance, all checks done by MySQLTuner are documented here.

Also as stated in the official documentation, it is still extremely important for you to fully understand each change you make to a MySQL database server. If you don’t understand portions of the script’s output, or if you don’t understand the recommendations, you should consult a knowledgeable DBA or system administrator that you trust.

As a good practice make sure to always test your changes on staging environments before implementing them on your production database.

On the same note, if you want to have a worry-free MySQL hosting and focus on your application, I would recommend trying out the DigitalOcean Managed Databases:

https://www.digitalocean.com/products/managed-databases-mysql/

This was mini tutorial was posted from @bobbyiliev in this question in our community: https://www.digitalocean.com/community/questions/how-to-tweak-mysql-mariadb-configuration-for-increased-performance-and-stability

Hope that this helps!
Regards,
Alex

by Justin Ellingwood
Swap space can be used as an "overflow" area for your system when you run out of RAM. The operating system can store data that would normally be kept in RAM on the hard drive in a specially formatted file. In this guide, we'll demonstrate how to create and use one of these files in Ubuntu 14.04.
Submit an Answer