Bobcares

Database error Out of resources when opening file in Plesk

by | Jan 8, 2022

Stuck with database error Out of resources when opening file in Plesk? We can help 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 help a customer  deal with this Plesk error.

How to resolve database error Out of resources when opening file in Plesk?

Typically, error appears as shown below:

mysqldump: Got error: 1016: “Can’t open file: ‘./example_db/table.frm’ (errno: 24)” when using LOCK TABLES

Not all the data was backed up into […]/databasename_1 successfully. mysqldump: Got error: 23: Out of resources when opening file ‘[…]’ (Errcode: 24 – Too many open files) when using LOCK TABLES

The value of max_connections changes to 214 automatically after some time, although the value itself is defined in my.cnf.

Issue occurs if default open_files_limit for MySQL has been reached.

Today, let us see the steps followed by our Support Techs to resolve the issue.

Please note the solution below is applicable to systemd-based systems:
– RHEL/CentOS/CloudLunix 7 and above
– Ubuntu 16.04 and above
– Debian 8 and above

1. Firstly, connect to the server via SSH.

2. Then, find the MySQL service in use:

systemctl list-unit-files | grep -E ‘mysql|mariadb’
mariadb.service enabled

3. Then, open the service configuration file from the step above in an editor:

systemctl edit mariadb.service

4. Next, add the following content:

[Service]
LimitNOFILE=4096

5. Then, save the changes and close the file.

6. Finally, restart the MySQL/MariaDB server to apply the changes:

systemctl restart mysql mysqld mariadb 2>/dev/null

If the same error appears after these changes, increase the value

[Need a solution to another query? We are just a click away.]

Conclusion

Today, we saw steps followed by our Support Engineers to resolve database error Out of resources.

PREVENT YOUR SERVER FROM CRASHING!

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.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

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