Monday, October 28, 2013

MySQL errno: 24 after upgrade from Debian Squeeze to Wheezy

Today I upgraded one of my Debian Squeeze servers to Debian Wheezy. During the upgrade, MySQL came up with some error messages like shown below:

[ERROR] /usr/sbin/mysqld: Can't open file: './database/table1.frm' (errno: 24)
[ERROR] /usr/sbin/mysqld: Can't open file: './database/table2.frm' (errno: 24)
[ERROR] /usr/sbin/mysqld: Can't open file: './database/table3.frm' (errno: 24)
[ERROR] /usr/sbin/mysqld: Can't open file: './database/table4.frm' (errno: 24)

After some research I found out, that the cause of the problem could be, that the mysql process has too many open files. I then added the following to the my.cnf and restarted the mysql service.

[mysqld]
open_files_limit = 10000

You may adjust the limit to a value of your choice. The default limit for Debian systems is 1024, so I would recommend to set this the limit to a value greater than 1024.

After adjusting the open files limit, the mysql server was running fine again.

No comments:

Post a Comment