Mysql crashes with error: Fatal error: cannot allocate memory for the buffer pool

Created:

2016-11-16 12:47:49 UTC

Modified:

2017-04-24 12:11:26 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Mysql crashes with error: Fatal error: cannot allocate memory for the buffer pool

Applicable to:

  • Plesk for Linux

Symptoms

MySQL crashes intermittently. There is an error in /var/log/mysqld.log file:

InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
InnoDB: Completed initialization of buffer pool
InnoDB: Fatal error: cannot allocate memory for the buffer pool
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting

Cause

Not enough memory for starting Mysql.

Resolution

  1. Make sure that you have enough free memory:

# free -m

  1. Change/Decrease MySQL buffer pool size in /etc/my.cnf :

innodb_buffer_pool_size

Have more questions? Submit a request
Please sign in to leave a comment.