MYSQL: Out of resources when opening file... (Errcode: 24)

The mysql error:  Out of resources when opening file... (Errcode: 24)   indicates that the number of files that msyql is permitted to open has been exceeded. 

This limit is controlled by the variable open_files_limit.   You can read this in phpMyAdmin (or the MySQL command line utility) with the statement:
SHOW VARIABLES LIKE 'open%'
To set this variable to a higher number, edit the /etc/my.cnf file and add the lines:
[mysqld]
open_files_limit = 5000
Then be sure to restart mysql with:   sudo /etc/init.d/mysql restart

Remember to use the server administrative account and sudo when you edit the file.  The choice of editor is up to you.

Now, showing the variable should show the number you choose.  

Note that 5000 shown above is an example. A good rule of thumb is to take the current number of files and add 1000 to it. If this doesn't help, add some more.  This number affects tha amount of memory that MySQL uses, so setting it to a very high number is not a good idea.

If you are not comfortable at the command line, ProHosterz Support will be happy to adjust this variable for you.
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How can I create a database from an sql backup file ?

First, create the database.. /path/to/bin/mysqladmin -u $mysqlusername -p$mysqlpassword create...

How can I see all running processes from my server?

Type the following command from shell prompt.It will display the currently running processes. ps...

Connecting to your Windows server

To connect to your Windows VPS or Dedicated server, you use Remote Desktop Connection. Go to:...

Connecting to your Linux server

To connect to your Linux VPS or Dedicated Server, you need a ssh client.  We recommend...

Memory usage seems too high inside a VPS

There are cases when you may notice that the memory usage is too high inside your VPS without a...