Innobackup 备份异常中断

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lmocm/article/details/79279651

最近再重新整理MySQL备份策略:

1, 通过mysqldump 备份每个库的dump 文件。

2, 通过innobackupex 全备 全部实例。

    --具体脚本,可以关注我,可以免费给哦 大笑大笑


话题扯回来,今天的话题。 innnobackupex 备份异常中断退出:

################# 报错日志 ###############

[MySQL-Innobakupex]:xxxxxxxx 180207 13:47:00 innobackupex: Starting the backup operation

IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".

180207 13:47:00 version_check Connecting to MySQL server with DSN'dbi:mysql:;mysql_read_default_group=xtrabackup;port=3306;mysql_socket=/tmp/mysql-db1-3306.sock'as 'backup' (using password: YES).
180207 13:47:00 version_check Connected to MySQL server
180207 13:47:00 version_check Executing a version check against the server...
180207 13:47:00 version_check Done.
180207 13:47:00 Connecting to MySQL server host: localhost, user: backup,password: set, port: 3306, socket: /tmp/mysql-db1-3306.sock
Using server version 5.7.18-log
/usr/bin/innobackupex version 2.4.8 based on MySQL server 5.7.13 Linux (x86_64)(revision id: 97330f7)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /data1/MySQL/mydb1/
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 3
xtrabackup: innodb_log_file_size = 268435456
InnoDB: Number of pools: 1
180207 13:47:00 >> log scanned up to (273441192442)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 21 for sys/sys_config, 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 ./email/send_record_20160917.ibd: 'open' returned OS error 124.Cannot continue operation
InnoDB: Cannot continue operation.

...Mysqlbinlog_last_three_is.......
mysql-db1-3306-bin.000437 502402
mysql-db1-3306-bin.000438 1382306

--------------------------------------------------------

关注 红色标记信息:

 1,这显示及提示 file 文件 “too many open files "

 2, 接着涉及到 returned OS error 124 , cannot continue operation"

 这里基本很明显 可能出现的问题点。


-----------------------------------------------------------

解决方法:

 1,查看当前实例打开文件数:

 MYSQL > show variables like '%open_files%';

2, cd 到对应的文件目录下,通过find data |wc -l 统计一下 实际文件数目.

3, 修改阈值 (注意,这里显示的是innodb...)

  修改参数innodb_open_files 值。

4, 查看系统参数  /etc/security/limits.conf

  发现确实设置比较小:

However, the issue is resolved when, I simply increase the 'open-files-limit' in my.cnf from
open-files-limit = 131072
to
open-files-limit = 151072
Please note, MySQL has not picked up these changes, its merely editing my.cnf file.
And, my systems open file hard limit is set to 131072 as well.
Excerpt of /etc/security/limits.conf
* soft nofile 131072
* hard nofile 131072

~ # 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) 118674
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 131072
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 118674
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

#################### The End ####################




猜你喜欢

转载自blog.csdn.net/lmocm/article/details/79279651