xtrabackup备份MySQL报错:InnoDB: Error number 24 means 'Too many open files'

Posted 何宇泽

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xtrabackup备份MySQL报错:InnoDB: Error number 24 means 'Too many open files'相关的知识,希望对你有一定的参考价值。

xtrabackup备份mysql报错:InnoDB: Error number 24 means ‘Too many open files‘

 

1.使用xtrabackup备份MySQL时出现如下报错:

190228 00:30:01 >> log scanned up to (88343615848)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 2 for mysql/plugin, old maximum was 0
InnoDB: Operating system error number 24 in a file operation.
InnoDB: Error number 24 means Too many open files
InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
InnoDB: File ./jira/AO_4B00E6_STASH_SETTINGS.ibd: open returned OS error 124. Cannot continue operation
InnoDB: Cannot continue operation.

 

2.查看备份使用的user的ulimit

[[email protected] mysql]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 385500
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 385500
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

 

3.修改/etc/security/limits.conf

vim /etc/security/limits.conf

* soft nofile 65535

* hard nofile 65535

重新备份还是报错。

 

4.修改MySQL的配置文件,增加如下参数:

vim /etc/my.cnf

innodb_open_files=1000

重新备份成功!

 

以上是关于xtrabackup备份MySQL报错:InnoDB: Error number 24 means 'Too many open files'的主要内容,如果未能解决你的问题,请参考以下文章

Mysql使用xtrabackup备份失败处理

mysql备份还原工具percona-xtrabackup

Xtrabackup恢复mysql数据时候报错:Original data directory is not empty!

MySQL物理备份 xtrabackup

MySQL数据库物理备份

MySQL数据库物理备份