Add to Favourites Add to Favourites    Print this Article Print this Article

InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.

If mysqld won't start up, and you check your mysql error log, eg:

cd /var/lib/mysql
tail -n 200 `hostname`.err>("cd /home/mysql" for Debian or FreeBSD)

and you find this error somewhere in it:

131201 19:22:27 InnoDB: Using Linux native AIO
131201 19:22:27  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.
131201 19:22:30  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
131201 19:22:30 InnoDB: Fatal error: cannot initialize AIO sub-system

then the solution would be to add:

innodb_use_native_aio = 0

to the [mysqld] section of your /etc/my.cnf file.

If this is a fresh install (no data yet), you might need to re-install mysql with the my.cnf setting in place

cd /usr/local/directadmin/scripts
./mysql.sh pass1 da_admin pass2

Where pass1 and pass2 can be set to any passwords you want.  pass1 will be the root mysql password, and pass2 will be the da_admin mysql password.

Another reported solution is to increase your kernel setting:
/proc/sys/fs/aio-max-nr

Was this answer helpful?

Also Read