#1016 - Can't open file: './database_name/#sql-38f_36aa.frm' (errno: 24)
errno: 24 means that too many files are open for the given process. There is a read-only mysql variable called 'open_files_limit' that will show how many open files are allowed by the mysqld:
SHOW VARIABLES LIKE 'open%';
A lot systems set this to something very low, like 1024. Unfortunately, the following will NOT work:
SET open_files_limit=100000
MySQL will respond with:
ERROR 1238 (HY000): Variable 'open_files_limit' is a read only variable
However, it is possible to make a change to /etc/my.cnf. This file may not exist, if not, just create it. Be sure it has the following contents:
[mysqld]
open-files-limit = 100000
Then, be sure to restart mysql:
sudo /etc/init.d/mysql restart
Now, SHOW VARIABLES LIKE 'open%' should show 100000. The number you use may be different.
Related videos on Youtube
Comments
-
Deepu over 1 year
I have table in mysql with MyISAM storage engine. I want to create partition on a particular table, for this I am executing the query -
alter table Stops PARTITION BY KEY(`stop_id`) PARTITIONS 200
Where 'stop_id' is type of varchar. While executing the above query I am getting the error -
#1016 - Can't open file: './database_name/#sql-38f_36aa.frm' (errno: 24)
Can anybody please help me to resolve this problem?
Thank You.
-
Deepu over 11 yearsThanks Jacob, it helps me lot
-
Mike about 10 yearsNote, for Debian, the file is located at
/etc/mysql/my.cnf
and the variableopen_files_limit
is not there. Just add it below the[mysqld]
section. -
magic_al over 9 yearsSame goes for my Ubuntu 12.04 LTS. File is located in
/etc/mysql/my.cnf
andopen_files_limit
isn't there. -
Andrew Stepanchuk about 8 years
adding open_files_limit = 100000
in[mysqld]
section had no effect.SHOW VARIABLES LIKE 'open%'
still shows1024
-
Horse about 8 years@Styopchik you actually have to use
open-files-limit=10000
for it to work in the cnf file, note hyphens not underscores