I got this error while migrating huge amount of accounts from one cpanel server to another.
[ERROR] /usr/sbin/mysqld: Can’t open file: ‘./dbname/tablename.frm’ (errno: 24)
errno: 24 means there is too many open files. There is a mysql variable named “open_files_limit" which shows how many open files are allowed in mysql by default. We cannot update this valuse using “Set” command as this variable is a read only variable.