Plesk error “cannot allocate memory for the buffer pool”

Plesk error “cannot allocate memory for the buffer pool” causing concern? Our experts have a solution for you.

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.

Let’s take a look at how our Support Team recently helped out a customer with the Plesk error “cannot allocate memory for the buffer pool”.

How to resolve: Plesk error “cannot allocate memory for the buffer pool”

Have you been having trouble accessing Plesk lately? If you find yourself facing the following error, you have come to the right place:

Error 2002. ERROR: PleskDBException: Unable to connect to database: mysql_connect(): Connection refused /var/run/mysqld/mysqld.sock (Error code: 2002)

This error often causes intermittent crashing of MySQL. We can locate the following error message in relation to this in the /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

According to our experienced Support Techs, this error is due to a larger MySQL buffer size than the available free RAM on the server. The obvious solution would be to allocate more RAM to the server.

However, if that is not currently possible, our Support Techs have come up with a workaround solution.

  1. First, we will connect to the server via SSH.
  2. Then, we will check how much free RAM is available on the server as seen below:
    # free -hm
    total used free shared buffers cached
    Mem: 1.0G  122M 901M 92K 0B 61M
    -/+ buffers/cache: 61M 962M
    Swap: 1.0G 0B 1.0G
  3. Next, we will set the buffer pool size of MySQL in /etc/my.cnf so that it is lesser than the available free RAM:
  4. Finally, we have to restart the MySQL service with the following command:
    # service mysqld restart || service mysql restart || service mariadb restart

[Seeking a solution to another query? We have your back.]


To sum up, the skilled Support Engineers at Bobcares demonstrated how to resolve the  “cannot allocate memory for the buffer pool” error.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.