本篇內(nèi)容主要講解“MySQL備份提示too many open files Errornumber 24怎么解決”,感興趣的朋友不妨來看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“mysql備份提示too many open files Errornumber 24怎么解決”吧!
10年積累的網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先網(wǎng)站制作后付款的網(wǎng)站建設(shè)流程,更有名山免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
一.問題的描述
備份程序 執(zhí)行前滾的時(shí)候報(bào)錯(cuò)。
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受制于以下幾個(gè)參數(shù) max_connections、 table_open_cache 、open_files_limit 以及 /etc/security/limits.conf中的配置。 max_connections和 table_open_cache 與open_files_limit 的關(guān)系: max_1 = 10 + max_connections + table_cache * 2; max_2 = max_connections * 5; max_3 = max_os_open_files;//操作系統(tǒng)單個(gè)進(jìn)程最大允許打開文件句柄(文件描述符)。 open_files_limit= max( max_1, max_2 ) > max_3 ? max_3 : max ( max_1, max_2); 綜合分析發(fā)現(xiàn),open_files_limit | 10240 而目前ibd表已經(jīng)10800個(gè)了。
三.解決問題
1.my.cnf 配置 open_files_limit = 20480
重啟mysql 發(fā)現(xiàn)沒有變化,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.經(jīng)過前三步,重啟mysql。
重啟mysql 發(fā)現(xiàn),open_files_limit | 20480。
5.修改OS用戶配置文件
經(jīng)過前四步,雖然在mysql中 看open_files_limit | 20480,但ibbackup還是在前滾時(shí)報(bào)錯(cuò)。報(bào),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;
發(fā)現(xiàn),.bash_profile調(diào)用 .bashrc ,.bashrc調(diào)用 /etc/bashrc
發(fā)現(xiàn),/etc/bashrc 中有
ulimit -S -c unlimited > /dev/null 2>&1
在這一行之后 添加
ulimit -n 20480 >/dev/null 2>&1
6.重啟mysql ,執(zhí)行備份程序,在--apply-log,還是報(bào)錯(cuò),報(bào),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 參數(shù)
之前這個(gè)參數(shù),設(shè)置成500.這次修改到1000.
重啟mysql 解決問題
到此,相信大家對(duì)“mysql備份提示too many open files Errornumber 24怎么解決”有了更深的了解,不妨來實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!
網(wǎng)頁題目:mysql備份提示toomanyopenfilesErrornumber24怎么解決
URL地址:http://www.ekvhdxd.cn/article32/jcgdpc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站導(dǎo)航、服務(wù)器托管、網(wǎng)站策劃、定制開發(fā)、、網(wǎng)站維護(hù)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)