InnoDB: Error: io_setup () failed with EAGAIN

Source: Internet
Author: User

After MySQL is installed recently, MySQL cannot be started normally when the MySQL service is started. The system prompts that/var/lib/mfailedZDB. pid is not updated and exits. The MySQL and Oracle are on the same host. Some kernel parameters should also be used with MySQL. The following describes the problem.

 

1. Fault
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 # faulty Environment
Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64)-Kernel \ r (\ l ).

 

2. Fault Analysis
# Viewing err log information
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' registry 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

# As shown in the preceding error log, the key information io_setup () failed with EAGAIN
# Io_setup () failed to lock

 

3. troubleshooting
The error code EAGAIN indicates that the maximum value of the available event is exceeded (see the description)
SZDB :~ # Cat/proc/sys/fs/aio-max-nr
65536 #64 K

SZDB :~ # Vi/etc/sysctl. conf
Fs. aio-max-nr = 262144 # adjusted to K

SZDB :~ # Sysctl-p

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

SZDB :~ #/Etc/init. d/mysql start # adjusted and started successfully
Starting MySQL... done

 

4. About fs. aio-max-nr
This parameter indicates the number of asynchronous IO requests that can be simultaneously owned.

Aio-nr & aio-max-nr:
Aio-nr is the running total of the number of events specified on
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 <libaio. h>

Tag Description
-----------------------------------------------
Int io_setup (int maxevents, io_context_t * ctxp );

DESCRIPTION:
Io_setup () creates an asynchronous I/O context capable of asynchronous ing at least maxevents. # create a context environment for receiving asynchronous 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 shocould 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. # in this case, The maximum value of the available event limit is exceeded.

ENOSYS io_setup () is not implemented on this architecture.

 

More references

For more information about Oracle RAC, see
Use crs_setperm to modify the resource owner and permissions of RAC.
Use crs_profile to manage RAC resource configuration files
RAC database startup and Shutdown
Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Connect Oracle RAC to a specified instance
Oracle RAC load balancing test (combined with server and client)
Oracle RAC server connection Load Balance)
Load Balance)
Non-Default port listening configuration in oracle rac (listener. ora tnsnames. ora)
Oracle rac listener Configuration (listener. ora tnsnames. ora)
Configure RAC load balancing and Failover
CRS-1006, CRS-0215 fault case
Installing Oracle 10g RAC Based on Linux (RHEL 5.5)
Use runcluvfy to verify the Oracle RAC installation environment

For more information about the basics and concepts of Oracle network configuration, see:
Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle LISTENER password (LISTENER)
Configure the ORACLE client to connect to the database

For more information about user-managed backup and recovery, see
Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
SYSTEM tablespace management and Backup Recovery
SYSAUX tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)

For information on RMAN backup recovery and management, see
RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine

For the ORACLE architecture, see
Oracle tablespace and data files
Oracle Password File
Oracle parameter file
Oracle ONLINE redo LOG FILE)
Oracle Control File)
Oracle archiving logs
Oracle ROLLBACK and UNDO)
Oracle database instance startup and Shutdown Process
Automated Management of Oracle 10g SGA
Oracle instances and Oracle databases (Oracle Architecture)

Related Article

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.