Mysql Too Many Open Files complete solution

Mysql Too Many Open Files complete solution

    On Linux, mysql sometimes reports too many open files, and then it cannot be connected. The general solution is to restart, but after restarting for a period of time

The same exception is reported again, and the cycle repeats,

    After investigation, because there are too many databases, for example, the database has a total of 1000 tables, if the value of the configuration item open_files_limit of the mysql configuration file my.cnf is set to less than 2000, there may be too many open files error, because the mysql database table access Will be at

The mysql thread directory generates table name 1.frm and table name .ibd2 files. When all database tables have been accessed, at least 2000 files will be opened. If the number of open files is less than 2000, too many open files error may be reported. Then the myql process cannot provide access.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326391948&siteId=291194637