最近安装好了MySQL之后,在启动MySQL服务时无法正常启动MySQL。提示没有更新/var/lib/mfailedZDB.pid并退出。该MySQL与Oracle位于同一主机。有些内核参数进行过调整应该也是使用与MySQL。下面是该问题的具体描述。

1、故障现象SZDB:/usr/src/mysql_src # /etc/init.d/mysql start

Starting MySQL...The server quit without updating PID file (/var/lib/mfailedZDB.pid).

SZDB:~ # cat /etc/issue     #故障环境

Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64) - Kernel \r (\l).

2、故障分析#查看err日志信息

SZDB:/var/lib/mysql # more SZDB.err

140505 16:05:59 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

140505 16:05:59 [Note] Plugin ‘FEDERATED‘ is disabled.

140505 16:05:59 InnoDB: The InnoDB memory heap is disabled

140505 16:05:59 InnoDB: Mutexes and rw_locks use GCC atomic builtins

140505 16:05:59 InnoDB: Compressed tables use zlib 1.2.3

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

140505 16:06:02 [ERROR] Aborting

140505 16:06:02 [Note] /usr/sbin/mysqld: Shutdown complete

140505 16:06:02 mysqld_safe mysqld from pid file /var/lib/mysql/SZDB.pid ended

#从上面的错误日志中可以看到,关键的一个信息io_setup() failed with EAGAIN

#io_setup()锁定失败

3、故障解决错误代码EAGAIN表明超出了可用event限制的最大值(见第4点中的描述)

SZDB:~ # cat /proc/sys/fs/aio-max-nr

65536                        #64k个

SZDB:~ # vi /etc/sysctl.conf

fs.aio-max-nr=262144         #调整为256k个

SZDB:~ # sysctl -p

#  Author : Leshami

#  Blog   :http://blog.csdn.net/leshami

SZDB:~ # /etc/init.d/mysql start    #调整后启动成功

Starting MySQL...                                                     done

4、关于fs.aio-max-nr该参数指同时可以拥有的的异步IO请求数目

aio-nr & aio-max-nr:

aio-nr is the running total of the number of events specified on the

io_setup system call for all currently active aio contexts.  If aio-nr

reaches aio-max-nr then io_setup will fail with EAGAIN.  Note that

raising aio-max-nr does not result in the pre-allocation or re-sizing

of any kernel data structures.

NAME

io_setup - Create an asynchronous I/O context

SYNOPSIS

#include

Tag           Description

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

int io_setup (int maxevents, io_context_t *ctxp);

DESCRIPTION:

io_setup() creates an asynchronous I/O context capable of receiving at least maxevents.#创建一个接收异步i/o的上下文环境

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:

Tag     Description

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

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.#此案例中返回的时超出了可用event限制的最大值

ENOSYS  io_setup() is not implemented on this architecture.

更多参考

原文:http://blog.csdn.net/leshami/article/details/25697441

iosetup mysql_InnoDB: Error: io_setup() failed with EAGAIN相关推荐

  1. iosetup mysql_InnoDB: Error: io_setup() failed with EAGAIN after 5 attempt

    在一台服务器中以各数据库的备份文件为数据文件启动多个MySQL实例供SQL Review使用.之前运行一直没有问题(最多的时候有23个MyS 在一台服务器中以各数据库的备份文件为数据文件启动多个MyS ...

  2. iosetup mysql_InnoDB:Error:io_setup()failedwithEAGAIN

    最近安装好了MySQL之后,在启动MySQL服务时无法正常启动MySQL.提示没有更新/var/lib/mfailedZDB.pid并退出.该MySQL与Oracle位于同一主机.有些内核参数进行过调 ...

  3. mysql failed with EAGAIN after 5 attempts.

    mysql遇到 failed with EAGAIN after 5 attempts.错误 2020-09-23T19:50:17.468993Z 0 [Warning] [MY-011070] [ ...

  4. 完美解决Error:Execution failed for task ':APP:transformClassesWithDexForDebug'...问题

    今天下载一个demo运行出现问题,错误如下图 我的问题是JDK 1.8 版本问题问题,我吧1.8改成1.7运行成功 这个实在app下面的build.gradle 相信大伙在Android开发过程中都避 ...

  5. 安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决

    在androidstuio中运行我的未完项目,报错: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. & ...

  6. gitlab报错 fatal: index-pack failed error: RPC failed; result=18, HTTP code = 200解决方案

    gitlab报错 "fatal: index-pack failed error: RPC failed; result=18, HTTP code = 200",如下图 这个问题 ...

  7. Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException

    异常Log: Error:Execution failed for task ':app:dexDebug'.  > com.android.ide.common.process.Process ...

  8. fixture详细介绍-作为参数传入,error和failed区别

    前言 fixture是pytest的核心功能,也是亮点功能,熟练掌握fixture的使用方法,pytest用起来才会得心应手! fixture简介 fixture的目的是提供一个固定基线,在该基线上测 ...

  9. error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054

    error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054 1.问题:git下载代码时,报" ...

最新文章

  1. mysql+esc,mysql(3):基础,常用命令句使用(2)--上集
  2. c语言定义的几种易错的说明
  3. Android国际化-补充
  4. CIO众论:转型路径和新技术实践
  5. u盘怎么重装系统win11教程
  6. 系统学习机器学习之参数方法(一)
  7. memcached学习笔记(1)——memcached原理
  8. 发电机机房设计规范_柴油发电机的容量选择,以及柴油发电机机房设计规范要求!...
  9. 计算机提示pdf不能加载,打开电脑中的PDF文档无法显示内容提示Please wait怎么解决...
  10. Linux下文件夹下子文件全部复制到多个文件夹中
  11. python机器视觉培训——Python的安装
  12. base64编码将字符串转换为图片
  13. 百度地图LBS开放平台AK一直没有用
  14. 推荐5款小众实用神器软件,功能强大,值得你去收藏
  15. 雨课堂网页端作业找不到的解决方法
  16. 【刷题】求长方形与正方形的个数
  17. 什么东西能够改善睡眠,拯救失眠的助眠好物推荐
  18. Python3,9行批量提取PDF文件的指定内容,这种操作,保证人见人爱....
  19. git 版本回退 强推代码
  20. 苏南大学计算机专业,江苏苏南五市2015年对口单招计算机专业二调试卷(含答案)20176158115272.doc...

热门文章

  1. html中用js格式化JSON输出
  2. 市值4000亿,超越京东小米!8年奋斗狂奔美团终于上市了
  3. 定义一个表示学生信息的类Student,要求如下:
  4. 【编译原理】构造产生如下语言的上下文无关文法各一个:
  5. Jetpack Compose中的Modifier
  6. 【tensorrt】——Network has dynamic or shape inputs, but no optimization profile has been defined.
  7. 对话框程序, 在 OnInitDialog的最后 showWindow(SW_HIDE),不管用的原因
  8. Leaflet 调用百度瓦片地图服务
  9. Android第三方库收藏汇总
  10. Photoshop支持ICO图片格式(咋个办呢 zgbn)