Fix Plesk backup error: plesk (Errcode: 24 – Too many open files) when using LOCK TABLES

Fix Plesk backup error: plesk (Errcode: 24 – Too many open files) when using LOCK TABLES

On a Ubuntu 16.04 server running MySQL 5.7.7 or higher, the default Plesk backup might show a database warning: plesk (Errcode: 24 – Too many open files) when using LOCK TABLES.

This is quite easy to fix. Login to the server via SSH and perform the following operations:

  • create a folder mysql.service.d in /etc/systemd/system/
#mkdir /etc/systemd/system/mysql.service.d
  • create a file override.conf and edit the content
#vim /etc/systemd/system/mysql.service.d/override.conf
  • add the following setting inside the override.conf file and save it with :wq
[Service]
LimitNOFILE=5000
  • reload the changed configuration and restart mysql
sudo systemctl daemon-reload
sudo systemctl restart mysql

Next thing is to perform a test backup and you are all done.