- Joined
- Dec 8, 2012
- Messages
- 773
- Points
- 63
I tried to view server error log file and found many these errors like this
errno: 24 simply 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, you can see this mysql variable by this command.
MySQL will respond with:
A lot systems set this to something very low, like 1185. If you set the value with this
Unfortunately it could not work
[mysqld]
open_files_limit = 48000
After that, restart mysql:
Now, SHOW VARIABLES LIKE 'open_files_limit'; should show 65000. The number you use may be different.
Hope that helps!
Code:
160708 22:26:09 [ERROR] /usr/sbin/mysqld: Can't open file: './mydb/file.frm' (errno: 24)
Code:
SHOW VARIABLES LIKE 'open_files_limit';
Code:
mysql> SHOW VARIABLES LIKE 'open_files_limit';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 1185 |
+------------------+-------+
1 row in set (0.01 sec)
Code:
SET open_files_limit=48000
But you can do another way by adding the follow commands into my.cnf fileERROR 1238 (HY000): Variable 'open_files_limit' is a read only variable
[mysqld]
open_files_limit = 48000
After that, restart mysql:
Code:
service mysqld restart
Code:
mysql> SHOW VARIABLES LIKE 'open_files_limit';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 65535 |
+------------------+-------+
1 row in set (0.00 sec)
Hope that helps!