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

[root@linux 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

從新備份仍是報錯。html

 

4.修改MySQL的配置文件,增長以下參數:

vim /etc/my.cnf innodb_open_files=1000

從新備份成功!mysql

相關文章
相關標籤/搜索