mysql備份提示 too many open files Errornumber 24
一.問題的描述
備份程式 執行前滾的時候報錯。
InnoDB: Errornumber 24 means 'Too many open files'. InnoDB: Some operatingsystem error numbers are described at InnoDB: http://dev.MySQL.com/doc/mysql/en/Operating_System_error_codes.html InnoDB: File name/home/nice/backup/mysql/var.20121211021656/user_db_20121123/tuser_like_core.ibd InnoDB: File operationcall: 'open'. InnoDB: Cannot continueoperation. innobackup:Error:
二.問題分析
openfiles 開的小了。 mysql的open_file_limit受制於以下幾個引數 max_connections、 table_open_cache 、open_files_limit 以及 /etc/security/limits.conf中的配置。 max_connections和 table_open_cache 與open_files_limit 的關係: max_1 = 10 + max_connections + table_cache * 2; max_2 = max_connections * 5; max_3 = max_os_open_files;//作業系統單個程式最大允許開啟檔案控制程式碼(檔案描述符)。 open_files_limit= max( max_1, max_2 ) > max_3 ? max_3 : max ( max_1, max_2); 綜合分析發現,open_files_limit | 10240 而目前ibd表已經10800個了。
三.解決問題
1.my.cnf 配置 open_files_limit = 20480
重啟mysql 發現沒有變化,open_files_limit | 10240。
2.ulimit -a
core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 1024 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 137216 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
3.vi /etc/security/limits.conf,新增
mysql soft nofile 8192 mysql hard nofile 20480
4.經過前三步,重啟mysql。
重啟mysql 發現,open_files_limit | 20480。
5.修改OS使用者配置檔案
經過前四步,雖然在mysql中 看open_files_limit | 20480,但ibbackup還是在前滾時報錯。報,open_file不夠。懷疑 還是沒有生效。
ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 1024 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 137216 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
於是,修改OS使用者配置檔案
分別檢視了.bash_profile 、.bashrc 、/etc/bashrc;
發現,.bash_profile呼叫 .bashrc ,.bashrc呼叫 /etc/bashrc
發現,/etc/bashrc 中有
ulimit -S -c unlimited > /dev/null 2>&1
在這一行之後 新增
ulimit -n 20480 >/dev/null 2>&1
6.重啟mysql ,執行備份程式,在--apply-log,還是報錯,報,open_file不夠
InnoDB: Errornumber 24 means 'Too many open files'. InnoDB: Some operatingsystem error numbers are described at InnoDB: http://dev.mysql.com/doc/mysql/en/Operating_System_error_codes.html
7.修改innodb_open_files 引數
之前這個引數,設定成500.這次修改到1000.
重啟mysql 解決問題
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30317998/viewspace-2653929/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- nginx 報錯 accept4 () failed (24: Too many open files)NginxAI
- 31.提示錯誤fopen_means Too many open files
- Too many open files報錯處理
- Ubuntu 解決 Too many open files 問題Ubuntu
- docker中使用systemctl命令時報Too many open files錯誤Docker
- 解決 Too many symbol filesSymbol
- Too many files with unapproved license異常APP
- 從原始碼角度談談open_files_limit的生成邏輯及"Too many open files"的解決思路原始碼MIT
- linux Too Many Files 問題檢視和解決方法Linux
- MySQL ERROR 1040: Too many connectionsMySqlError
- too many open files 與程式網路連線資料檢視[轉載自北風之神巨佬的文章]
- MySQL問題處理——1040錯誤Too many connectionsMySql
- mysql報錯Changed limits: max_open_files: 5000MySqlMIT
- React報錯之Too many re-rendersReact
- 如何修復 SPF PermError: too many DNS lookupsErrorDNS
- nginx 修改 max open files limitsNginxMIT
- MySQL異常刨析:ata source rejected establishment of connection, message from server: “Too many connectionMySqlServer
- [20230104]Oracle too many parse errors PARSE ERROR.txtOracleError
- [20200309]rlwrap: error: Cannot execute sqlplus: Too many levels of symbolic linErrorSQLSymbol
- ValueError: output parameter for reduction operation logical_and has too many dimensions ?Error
- mysql的冷備份與熱備份MySql
- MySQL:xtrabackup備份MySql
- Mysql備份系列MySql
- Java備份MySQLJavaMySql
- 初探MySQL資料備份及備份原理MySql
- Mysql備份與恢復(1)---物理備份MySql
- 解決:ChatGPT too many requests in 1 hour.Try again laterChatGPTAI
- MySQL備份與主備配置MySql
- 【MySQL】MySQL備份和恢復MySql
- mysql每日備份for LinuxMySqlLinux
- Mysql備份恢復MySql
- mysql備份指令碼MySql指令碼
- MySQL 定時備份MySql
- mysql5.5.20備份MySql
- MySQL資料備份MySql
- hadoop 啟動 Permissions for id_rsa are too openHadoop
- Mysql備份與恢復(2)---邏輯備份MySql
- Method has too many Body parameters: public abstract com.cloud.module.smartkeCloud