I'm getting "Can't open file: './databasename/tablename.frm' (errno: 24)" errors from MySQL but as far as I can tell, I've set the necessary limits far higher than I need.
Other than the kern.maxfiles
and kern.maxfilesperproc
sysctls and the open_files_limit
MySQL variable, are there any other limits which would be kicking in and causing this?
$ mysql -u root -p -e 'SHOW STATUS' | grep '^Open'
Enter password:
Open_files 356
Open_streams 0
Open_tables 245
Opened_tables 0
$ mysql -u root -p -e 'SHOW GLOBAL VARIABLES' | grep 'open_files_limit'
Enter password:
open_files_limit 18000
$ sysctl -a | grep kern.maxfiles
kern.maxfiles: 20000
kern.maxfilesperproc: 18000
$ limits -n -U mysql
Resource limits for class default:
openfiles infinity
Issue looks more like a bug than bumping into a limit.
Only suggestion is to update to latest stable MySQL version, or even to FreeBSD 7.2 (they higher almost all limits on FreeBSD 7.2 amd64)
what is your
max_connections
Setting? For every connection one (or more) files are to be opened. Try to reduce. Alsotable_cache
Setting can influence the number of open files. See mysql manual for more help.CU, arnep