InnoDB: Error number 24 means ‘Too many open files’.--转载
一.问题的描述
备份程序 执行前滚的时候报错。(-apply-log)
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 解决问题
四.关于Operating_System_error_codes.html
Linux System Error Codes
The following tableprovides a list of some common Linux system error codes. For a more completelist, see Linux source code.
|
Number |
Macro |
Description |
|
1 |
EPERM |
Operation not permitted |
|
2 |
ENOENT |
No such file or directory |
|
3 |
ESRCH |
No such process |
|
4 |
EINTR |
Interrupted system call |
|
5 |
EIO |
I/O error |
|
6 |
ENXIO |
No such device or address |
|
7 |
E2BIG |
Arg list too long |
|
8 |
ENOEXEC |
Exec format error |
|
9 |
EBADF |
Bad file number |
|
10 |
ECHILD |
No child processes |
|
11 |
EAGAIN |
Try again |
|
12 |
ENOMEM |
Out of memory |
|
13 |
EACCES |
Permission denied |
|
14 |
EFAULT |
Bad address |
|
15 |
ENOTBLK |
Block device required |
|
16 |
EBUSY |
Device or resource busy |
|
17 |
EEXIST |
File exists |
|
18 |
EXDEV |
Cross-device link |
|
19 |
ENODEV |
No such device |
|
20 |
ENOTDIR |
Not a directory |
|
21 |
EISDIR |
Is a directory |
|
22 |
EINVAL |
Invalid argument |
|
23 |
ENFILE |
File table overflow |
|
24 |
EMFILE |
Too many open files |
|
25 |
ENOTTY |
Inappropriate ioctl for device |
|
26 |
ETXTBSY |
Text file busy |
|
27 |
EFBIG |
File too large |
|
28 |
ENOSPC |
No space left on device |
|
29 |
ESPIPE |
Illegal seek |
|
30 |
EROFS |
Read-only file system |
|
31 |
EMLINK |
Too many links |
声明:本文档可以随意更改,但必须署名原作者
作者:凤凰舞者 qq:578989855
InnoDB: Error number 24 means ‘Too many open files’.--转载的更多相关文章
- 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时出现如下报错 ...
- InnoDB: Error number 24 means ‘Too many open files’
一.问题的描述 备份程序 执行前滚的时候报错.(-apply-log) InnoDB: Errornumber 24 means 'Too many open files'. InnoDB: Some ...
- mysql数据库报错:InnoDB: Operating system error number 13 in a file operation
环境:centos6.5 x86_64 启动mysql发现日志报错(日志路径可以查看/etc/my.cnf的配置) 160722 10:34:08 [Note] Found 42570716 of 4 ...
- InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法
InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法 140628 8:10:48 [Note] Plugi ...
- InnoDB: ERROR: the age of the last checkpoint
--InnoDB: ERROR: the age of the last checkpoint ---------------------------------------------------- ...
- MySQL Error Number 1005 Can’t create table(Errno:150)
mysql数据库1005错误解决方法 MySQL Error Number 1005 Can’t create table ‘.\mydb\#sql-328_45.frm’ (errno: 150) ...
- 转 InnoDB Error Handling
14.20.4 InnoDB Error Handling Error handling in InnoDB is not always the same as specified in the SQ ...
- 【MySQL】5.6.x InnoDB Error Table mysql.innodb_table_stats not found
[问题描述]: 检查error log的时候发现大量warnings: [Warning] InnoDB Error Table mysql.innodb_index_stats not found ...
- MySQL导入数据遇到Error Number: 1467 Failed to read auto-increment value from storage engine错误
MySQL导入数据遇到Error Number: 1467 Failed to read auto-increment value from storage engine错误 创建表的语句 CREAT ...
随机推荐
- HDU 2955 01背包(思维)
Robberies Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S ...
- OMG点菜系统
算是一个项目吧,自己一个人也写了很久,有很多东西是自己写的,当然也有在网上借鉴人家大神的,不一而足,代码太多,不贴了,直接上图.(一直出现的天蓝色是使用windows自带主题壁纸上截取的一段) [原本 ...
- JQuery特效分享网站
各种jquery特效分享,可以去上面找资源. http://www.jqshare.com/
- Win7下通过eclipse远程连接CDH集群来执行相应的程序以及错误说明
最近尝试这用用eclipse连接CDH的集群,由于之前尝试过很多次都没连上,有一次发现Cloudera Manager是将连接的端口修改了,所以才导致连接不上CDH的集群,之前Apache hadoo ...
- ACM 杂题,思路题 整理
UVa 11572 - Unique Snowflakes 问一个数组中,无重复数字的最长子串长度是多少. 用map维护某数字上次出现的位置.另外用变量last表示上次出现数字重复的位置. 如果出现重 ...
- 从零开始学习Node.js例子四 多页面实现数学运算
app-node.js ; var http = require('http'); var htutil = require('./htutil'); var server = http.create ...
- 如何改善magento前台图片质量
magento做的网店的 前台产品图片仔细看会发现不够清晰,质量比原图损失较大,这是因为系统在用GD2压缩图片时默认压缩 质量是80%.为了提高产品图片质量,我们可以修改代码来改变压 magento做 ...
- cdh5.7权限测试示例
转载请注明出处:http://www.cnblogs.com/xiaodf/ 本文旨在展示CDH基于Kerberos身份认证和基于Sentry的权限控制功能的测试示例. 1. 准备测试数据 cat / ...
- JSP基础总结 脚本元素
JSP脚本元素 1. JSP声明语句 JSP声明语句以<%!开始,以%>结束,其语法格式为:<%! 声明语句 %> 使用声明语句的变量为全局变量,也就是说,当有多个用户在执行 ...
- PAT (Basic Level) Practise:1012. 数字分类
[题目链接] 给定一系列正整数,请按要求对数字进行分类,并输出以下5个数字: A1 = 能被5整除的数字中所有偶数的和: A2 = 将被5除后余1的数字按给出顺序进行交错求和,即计算n1-n2+n3- ...