Xtrabackup solve error innodb too many file problem

Software version:
CentOS 7.5-64
MySQL 5.7
xtrabackup 2.4

Accordance with the relevant documents and information on centos7 installed xtrabackup, then back up the error in accordance with the command:

[root@host7 ~]#innobackupex --default-file=/etc/my.cnf --user=root --password=111111 --host=localhost /Data/bak_db/

……
……
InnoDB: Operating system error number 24 in a file operation.
InnoDB: Error number 24 means 'Too many open files'.

Operating system, the system pressure to prevent excessive or insufficient resources to process digital or digital-to-peer file the user can open to do the appropriate limit.
Since the above command error, it is thought likely to be caused by the wrong system limits.

Solution:

In related redhat Linux system, /etc/security/limits.conf configuration (limit) for each user of resources.

格式:
#<domain> <type> <item> <value>
# soft core 0
#
hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4

Limits.conf open the file, add it at the last content:

  • soft nproc 2047
  • hard nproc 16384
  • soft nofile 65536
  • Hard nofile 65536

After you add than to take effect immediately, need to restart

If you can not reboot, you can use the command set, the next reboot after the failure:
 [root @ host7 ~] # ulimit -n 65535

Because I was after in their own virtual machine, directly reboot the system.
Rerun backup command
[host7 the root @ ~] = #innobackupex --default-File / etc / --user the my.cnf the root --password = = = 111111 --host localhost / the Data / bak_db /
......
......
181 207 14 : 14: 53 [00] Copying ib_buffer_pool to / the Data / bak_db / 2018-12-07_14-13-51 / ib_buffer_pool
181 207 14:14:53 [00] ... DONE
181 207 in the Created 14:14:53 Backup Directory ' / the Data / bak_db / 2018-12-07_14-13-51 / '
the MySQL the binlog position: filename' mysql_3306.000009 ', position' 154 '
181 207 14:14:53 [00] Writing / the Data / bak_db / 2018-12- 07_14-13-51 / Backup-my.cnf
181 207 14:14:53 [00] ... DONE
181 207 14:14:53 [00] Writing / the Data / bak_db / 2018-12-07_14-13-51 / xtrabackup_info
181207 14:14:53 [00] ... done
xtrabackup: Transaction log of lsn (1063990393) to (1063990402) was copied.
181207 14:14:53 completed OK!

To the corresponding catalog has also been backed up files.

Guess you like

Origin blog.51cto.com/jxplpp/2480223