InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts
在一台server中以各数据库的备份文件为数据文件启动多个MySQL实例供SQL Review使用。
之前执行一直没有问题(最多的时候有23个MySQL实例同一时候执行)。后来新配置了一台server,启动其相应的实例时失败。
部分错误日志例如以下:
……
140505 16:05:59 InnoDB: Using Linux native AIO
140505 16:05:59 InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
InnoDB: Warning: io_setup() attempt 1 failed.
InnoDB: Warning: io_setup() attempt 2 failed.
InnoDB: Warning: io_setup() attempt 3 failed.
InnoDB: Warning: io_setup() attempt 4 failed.
InnoDB: Warning: io_setup() attempt 5 failed.
140505 16:06:02 InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
140505 16:06:02 InnoDB: Fatal error: cannot initialize AIO sub-system
140505 16:06:02 [ERROR] Plugin 'InnoDB' init function returned error.
140505 16:06:02 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140505 16:06:02 [ERROR] Unknown/unsupported storage engine: InnoDB
……
通过错误日志了解到最早错误发生的地方为 InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts。
这个io_setup() failed with EAGAIN是关键。
我们man一下io_setup
NAME
io_setup - Create an asynchronous I/O context
……
DESCRIPTION
io_setup() creates an asynchronous I/O context capable of receiving at least maxevents. ctxp must not point to an AIO context that already exists, and must be
initialized to 0
prior to the call. On successful creation of the AIO context, *ctxp is filled in with the resulting handle.
RETURN VALUE
io_setup() returns 0 on success; otherwise, one of the errors listed in the "Errors" section is returned.
ERRORS
EINVAL ctxp is not initialized, or the specified maxevents exceeds internal limits. maxevents should be greater than 0.
EFAULT An invalid pointer is passed for ctxp.
ENOMEM Insufficient kernel resources are available.
EAGAIN The specified maxevents exceeds the user’s limit of available events.
ENOSYS io_setup() is not implemented on this architecture.
CONFORMING TO
……
看到io_setup用来创建异步I/O上下文环境用于特定目的,错误代码EAGAIN意为指定的maxevents 超出了用户可用events的限制。
该server上已经执行了较多的MySQL实例,创建异步I/O的资源已经达到了临界,所以新的实例启动失败。
最后通过在启动MySQL实例时增加 --innodb_use_native_aio = 0攻克了问题。
也有通过更改系统设置来解决此问题的(待验证)。
cat /proc/sys/fs/aio-max-nr能够查看到当前的aio-max-nr的值一般为65536(64k个)
可通过下述步骤改变该文件里的值(上述文件不能直接编辑)
sudo vim /etc/sysctl.conf
改动或增加
fs.aio-max-nr=262144(256k个)
运行命令改动/proc/sys/fs/aio-max-nr
sysctl -p
能够看到/proc/sys/fs/aio-max-nr中的值发生了变化
cat /proc/sys/fs/aio-max-nr
重新启动MySQL实例
还有通过改动mysql源代码来避免该问题的,但普通情况下不推荐也没有必要这么做。
InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts的更多相关文章
- 【MySQL】InnoDB: Error: checksum mismatch in data file 报错
参考:http://www.jb51.net/article/66951.htm 用5.7版本启动原5.5实例后,再用5.5启动出现以下报错 InnoDB: Error: checksum misma ...
- InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
启动WAMP Server的时候报例如以下的错误: 140618 23:12:32 [Note] Plugin 'FEDERATED' is disabled. 140618 23:12:32 Inn ...
- Error:Execution failed for task ':app:clean'.
运行时出现 Error:Execution failed for task ':app:clean'. 错误,Builld->Clean Project即可.
- DBCC CHECKDB 遭遇Operating system error 112(failed to retrieve text for this error. Reason: 15105) encountered
我们一个SQL Server服务器在执行YourSQLDBa的作业YourSQLDba_FullBackups_And_Maintenance时遇到了错误: Exec YourSQLDba.Maint ...
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
使用android studio 时,编译成功但用build apk时却报错 环境: android studio 1.5, jdk1.7 错误:Error:Execution failed for ...
- smtplib.SMTPAuthenticationError: (535, b'Error: authentication failed')解决办法
raise SMTPAuthenticationError(code, resp) smtplib.SMTPAuthenticationError: (535, b'Error: authentica ...
- javaMail使用163邮箱报535 Error: authentication failed
javaMail使用网易163邮箱或者是126或者是网易其他邮箱报535 Error: authentication failed javax.mail.AuthenticationFailedExc ...
- 使用git error: RPC failed; result=22, HTTP code = 411
使用git提交比较大的文件的时候可能会出现这个错误 error: RPC failed; result=22, HTTP code = 411 fatal: The remote end hung u ...
- Android Studio 运行出现 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
转载请标明出处: http://www.cnblogs.com/why168888/p/5978381.html 本文出自:[Edwin博客园] 我引用compile 'com.squareup.re ...
随机推荐
- MATLAB读取每个文件夹下的badcsv文件后合并为总的badexcel文件
clear; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%读取子文件夹中bad.csv数据%并把所有数据写到一个excel文件中%%%%%%%%%%%%%%%%%% ...
- Native.js示例汇总
Native.js虽然强大和开放,但很多web开发者因为不熟悉原生API而难以独立完成.这篇帖子的目的就是汇总各种写好的NJS代码,方便web开发者.众人拾柴火焰高,有能力的开发者多多提交NJS代码, ...
- java中的缓存技术该如何实现
1缓存为什么要存在?2缓存可以存在于什么地方?3缓存有哪些属性?4缓存介质? 搞清楚这4个问题,那么我们就可以随意的通过应用的场景来判断使用何种缓存了. 1. 缓存为什么要存在?一 般情况下,一个网站 ...
- 第五章:C++程序的结构
主要内容: 1.作用域与可见性 2.对象的生存期 3.数据与函数 4.静态成员 5.共享数据的保护 6.友元 7.编译预处理命令 8.多文件结构和工程 作用域:函数原型作用域.块作用域.类作用域.文件 ...
- Python中 模块、包、库
模块:就是.py文件,里面定义了一些函数和变量,需要的时候就可以导入这些模块. 包:在模块之上的概念,为了方便管理而将文件进行打包.包目录下第一个文件便是 __init__.py,然后是一些模块文件和 ...
- 【三种负载均衡器的优缺点】LVS Nginx HAProxy
搭建负载均衡高可用环境相对简单,主要是要理解其中原理.此文描述了三种负载均衡器的优缺点,以便在实际的生产应用中,按需求取舍. 目前,在线上环境中应用较多的负载均衡器硬件有F5 BIG-IP,软件有LV ...
- 03002_Http请求协议分析
1.编写一个form.html的表单页面 (1)使用EclipseEE新建一个动态的web项目: (2)Dynamic web module version选择2,5版本: (3)新建一个form.h ...
- 【05】Firebug动态执行JavaScript
Firebug动态执行JavaScript 您可以使用Firebug来编写并实时执行一个JavaScript. 这是为了测试,并确保该脚本工作正常,这是将JavaScript代码部署在生产环境前的好方 ...
- zoj 2736 Daffodil number
Daffodil number Time Limit: 2 Seconds Memory Limit: 65536 KB The daffodil number is one of the ...
- 【Ajax 1】Ajax与传统Web开发的区别
导读:从用户体验度的角度来说,利用Ajax进行开发的网站,其体验度高于利用传统Web开发技术,那么,是什么因素导致了这一现象呢?难道说Ajax开发,就一定优于传统Web技术吗?本篇文章,将主要介绍Aj ...