MySQL Crash with Fatal error: cannot allocate memory for the buffer pool

We have a dozen websites mostly running WordPress, and one Drupal website on Digital Ocean with a 1GB instance. The server was running flawlessly for 6 months, and then the MySQL starts to crash every few days unexpectly with the following error in the mysql error log.

.

Upon trying to restart the MySQL service, we are getting the following error:

Solution:

The problem is that the server does not have enough memory to allocate for MySQL process. There are a few solutions to this problem.

(1) Increase the physical RAM. Adding 1GB of additional RAM will solve the problem.
(2) Allocate SWAP space. Digital Ocean VPS instance is not configured to use swap space by default. By allocating 512MB of swap space, we were able to solve this problem. To add swap space to your server, please follow the following steps:

(3) Reduce the size of MySQL buffer pool size

Restart mysql and you’re good to go. You’ll have to continuously monitor MySQL process for a week or two to ensure that the server is running without memory allocation problem.

Sevebilirsin...

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir