Posts

MySQL ‘File not found’ error

I ran into a problem the other day with our production machine running MySQL 4.1.11.

I have an automated system setup to make a backup of the entire database nightly. During this procedure, I got this error:

mysqldump: Got error: 1105: File '[filename]' not found
(Errcode: 24) when using LOCK TABLES

I didn’t know what to make of it, as the [filename] that it was looking for was right there on the disk, and it had correct permissions. I ran the mysqldump program manually and got the same error, but on a different file. Much more research later and… as it turns out, the problem is NOT that it can’t find the file, but that the system had run out of file handles. I added this line to /etc/my.cnf:

open_files_limit=8192

Then I restarted the database and all was well.

This is one of those rare cases where the error message is not entirely helpful. I hope this helps explain things.

Leave a Reply

You must be logged in to post a comment.

Archives and Links