Ubuntu: 12.04 LTS(Linux mysql02 3.2.0-40-generic#64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU / Linux)
MySQL: Ubuntu发行版5.5.31
Apparmor:已删除!
服务器已经运行了一年多。然后,这个星期一MySQL开始失败。更新导致了此问题,我们无法弄清楚它是什么。我们甚至试图回滚到MySQL 5.5.30,但是没有运气。我们在5.5.31返回。
MySQL错误日志条目:
130430 7:55:46 [ERROR] Error in accept: Too many open files
130430 7:55:46 [ERROR] /usr/sbin/mysqld: Can't open file: './eci_elite_test/fclvod.frm' (errno: 24)
130430 7:55:46 [ERROR] /usr/sbin/mysqld: Can't open file: './eci_elite_test/fcnote.frm' (errno: 24)
130430 7:55:47 [ERROR] /usr/sbin/mysqld: Can't open file: './eci_elite_test/ffcont.frm' (errno: 24)
130430 7:55:47 [ERROR] /usr/sbin/mysqld: Can't open file: './eci_elite_test/ffcontv.frm' (errno: 24)
130430 7:55:47 [ERROR] /usr/sbin/mysqld: Can't open file: './eci_elite_test/ffnote.frm' (errno: 24)
130430 7:55:47 [ERROR] /usr/sbin/mysqld: Can't open file: './eci_elite_test/frcfcl.frm' (errno: 24)
看来我们遇到了ulimit问题。我们已经完全删除了APPARMOR。我们增加了/etc/security/limits.conf,仍然没有运气:
# Out of desperation....
* soft nofile 49152
* hard nofile 65536
# No effect!?!!?
#mysql soft nofile 49152
#mysql hard nofile 65536
并显示limits.conf是否有效:
root@mysql02:/etc/security# ulimit -Sa | grep "open files"
open files (-n) 49152
root@mysql02:/etc/security# ulimit -Ha | grep "open files"
open files (-n) 65536
这是my.cnf中的重要条目
[mysqld_safe]
open_files_limit = 16384
[mysqld]
open_files_limit = 16384
然而:
root@mysql02:/etc/mysql# mysqladmin -u root -pThePassword variables| grep open_files_limit
open_files_limit | 1024
我们完全陷入了困境。任何帮助将不胜感激。