1. 程式人生 > >too many files問題open_files_limit值更改無效(轉)

too many files問題open_files_limit值更改無效(轉)

oba mct 還需要 重啟 無效 serve 修改 最後一行 內容

原文http://blog.itpub.net/30127122/viewspace-2140277/ 系統的值是正確的。然後修改/etc/my.cnf配置文件,添加 open_files_limit=65535 重啟服務 之後 查看 show variables like ‘%open%‘; 發現open_files_limit的值 還是1024 此時我們需要修改最後一個地方 cat -n /etc/systemd/system/mysql.service 在mysql.service中添加 LimitNOFILE=65535 #新加入的內容 添加在最後一行 重啟服務服務,修改了mysql.server有可能需要systemctl daemon-reload
innobackupex 進行備份的時候 產生too many open files 發現我mysql下面文件數大於10W 此時需要設置 ulimit -n 1048576 重啟後失效 所以還需要修改系統配置文件 修改系統配置文件/etc/security/limits.conf * soft nofile 1048576 * hard nofile 1048576 並且設置 my.cnf open-files-limit=1048576 重啟mysql服務 問解決題

too many files問題open_files_limit值更改無效(轉)