InnoDB:Error:io_setup () failed with Eagain

Source: Internet
Author: User

MySQL was not started properly when you started MySQL service after you recently installed MySQL. Prompt does not update/var/lib/mfailedzdb.pid and exits. The MySQL is located on the same host as Oracle. Some kernel parameters have been adjusted and should also be used with MySQL. The following is a specific description of the problem.

1, fault phenomenon
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 SP3 (x86_64)-Kernel \ R (\l).

2. Fault Analysis
#查看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. Would 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

#从上面的错误日志中可以看到, one of the key information Io_setup () failed with Eagain
#io_setup () lock failed

3, fault resolution
Error code Eagain indicates that the maximum value of the available event limit is exceeded (see the description in 4th)
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, about FS.AIO-MAX-NR
This parameter refers to the number of asynchronous IO requests that can be owned at the same time

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 would 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 <libaio.h>

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 Environment
Ctxp must not point to an AIO context that already exists, and must is initialized to 0 prior to the call.
On successful creation of the AIO context, *ctxp are 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 are passed for CTXP.

ENOMEM Insufficient kernel resources is available.

Eagain the specified maxevents exceeds the user ' s limit of available events. #此案例中返回的时超出了可用event限制的最大值

Enosys Io_setup () is not implemented on this architecture.

More references

for Oracle RAC please refer to
To modify the owner and permissions of a RAC resource by using Crs_setperm
Managing RAC resource profiles with Crs_profile
Startup and shutdown of the RAC database
Again, Oracle RAC Services
Services in Oracle Database 10g
Migrate Datbase from Single instance to Oracle RAC
Oracle RAC connects to the specified instance
Oracle RAC load Balancing test (combined with server-side vs. client)
Oracle RAC server-side Connection load balancing (load Balance)
Oracle RAC Client Connection Load balancer (load Balance)
Non-default port listening configuration under ORACLE RAC (Listener.ora Tnsnames.ora)
ORACLE RAC Listener configuration (Listener.ora Tnsnames.ora)
Configuring RAC load Balancing and failover
CRS-1006, a case of CRS-0215 failure
Install Oracle 10g RAC based on Linux (RHEL 5.5)
Using RUNCLUVFY to verify the Oracle RAC installation Environment

For information on the basic and conceptual aspects of Oracle Network configuration, please refer to:
Configure dynamic Service registration for non-default ports
Configuring Sqlnet.ora to restrict IP access to Oracle
Oracle Listener log Configuration and management
Set the Oracle listener password (LISTENER)
Configuring an Oracle client to connect to a database

      Oracle Cold backup
     Oracle Hot backup
     Oracle Backup recovery concept
      Oracle Instance Recovery
     Oracle User-managed recovery processing
     SYSTEM Table space Management and backup recovery
     sysaux table space Management and recovery
     Oracle Backup-based control file recovery (unsing Controlfile)

     Overview of Rman and its architecture
     Rman configuration, monitoring and management
     detailed Rman backup
      Rman Restore and recovery
     creation and use of Rman catalog
     Create Rman storage scripts based on catalog
     Catalog-based Rman backup and recovery
     Rman Backup path Confusion
      Using Rman for heterogeneous backup recovery (win platform)
     migrating file system databases to ASM
     Linux using Rman Next Rman backup shell script
     migrate database to a different machine using Rman

     Oracle tablespace and data file
     Oracle password file
     Oracle parameter file
      Oracle Online Redo log file (online log file)
     Oracle Control file (controlfile)
      Oracle Archive Log
     Oracle Rollback (ROLLBACK) and undo
     Oracle DB instance starts shutdown process
     Automated management of Oracle 10g SGA
     Oracle Instance and Oracle database ( Oracle architecture)  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.