If you encounter an "ERROR" ... ' Not Found (errno:23) ', "Cannot open the file: ... (errno:24) ", or other error from MySQL with errno 23 or errno 24, which indicates that there are not enough file descriptors assigned to the MySQL server. You can use the Perror utility to understand the meaning of the error number:
Shell> perror 23
Error code 23: File Table Overflow
Shell> Perror 24
Error code 24: Too many open files
Shell> perror 11
Error Code 11: resource is temporarily unavailable
The problem here is that mysqld is trying to open too many files at the same time. You can tell mysqld not to open too many files at once, or to increase the number of mysqld available file descriptors.
To tell Mysqld to control an open file to a smaller number, you can reduce the value of the Table_cache system variable (), thereby reducing the table cache (the default is 64). Lowering the Max_connections value also reduces the number of open files (the default value is 100).
To change the number of file descriptors available for mysqld, you can use the "--open-files-limit" option or setting (starting with MySQL 3.23.30) open_files_limit system variables on Mysqld_safe.
The easiest way to set these values is to add an option to the options file.
If the mysqld version is lower and the number of open files is not supported, you can edit the Mysqld_safe script. There are 1 commented rows Ulimit-n 256 in the script. You can delete the ' # ' character uncomment the line, change the value 256 to set the number of file descriptors available for mysqld.
"--open-files-limit" and ulimit can increase the number of file descriptors, but not the maximum number of operating system limits. There are also 1 "hard" limits that can be overwritten only when you start Mysqld_safe or mysqld as root (remember, in that case, you also need to use the "--user" option to start the server so that it does not continue to run as root after you start). Refer to your system documentation if you need to increase the number of available file descriptors for each process by operating system limits.
Note: If running tcsh shell,ulimit does not work! When the current limit value is requested, TCSH can also notify incorrect values. In this case, you should use SH to start the mysqld_safe.