久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

mysql備份提示too many open files Errornumber 24怎么解決

158次閱讀
沒有評論

共計 2763 個字符,預計需要花費 7 分鐘才能閱讀完成。

本篇內容主要講解“mysql 備份提示 too many open files Errornumber 24 怎么解決”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓丸趣 TV 小編來帶大家學習“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 解決問題

到此,相信大家對“mysql 備份提示 too many open files Errornumber 24 怎么解決”有了更深的了解,不妨來實際操作一番吧!這里是丸趣 TV 網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-28發表,共計2763字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 杭锦后旗| 塔河县| 华安县| 睢宁县| 忻州市| 渝北区| 隆德县| 平顶山市| 芦山县| 新野县| 冷水江市| 建湖县| 陕西省| 罗山县| 阿鲁科尔沁旗| 中宁县| 平舆县| 南投县| 驻马店市| 房产| 当阳市| 巴楚县| 厦门市| 海南省| 阆中市| 内丘县| 正阳县| 河池市| 洛浦县| 西安市| 渭源县| 高雄县| 商洛市| 河津市| 沙田区| 贡嘎县| 南宁市| 辽阳市| 土默特左旗| 临清市| 库伦旗|