[InnoDB] io_setup() failed with EAGAIN. Will make 5 attempts before giving up

You need to increase aio-max-nr value to something that will allow MySQL to run.

What is aio-max-nr ?

The Asynchronous non-blocking I/O (AIO) feature that allows a process to initiate multiple I/O operations simultaneously without having to wait for any of them to complete. The Linux kernel provides aio-max-nr.

How to see current value

Use the cat command:

cat /proc/sys/fs/aio-max-nr 
cat /proc/sys/fs/aio-nr

We can use the sysctl command also:

sysctl  fs.aio-nr
sysctl fs.aio-max-nr

Setting the sysctl parameter aio-max-nr value to 524288

Execute the sysctl:

sudo sysctl -w fs.aio-max-nr=1048576

1048576 is very high, start with something like 524288.

sudo sysctl -w fs.aio-max-nr=524288

Edit the /etc/sysctl.conf

To set the aio-max-nr value at boot time permanently

sudo vim /etc/sysctl.conf

Append

fs.aio-max-nr=524288

Save and then run:

sudo sysctl -p /etc/sysctl.conf

Restart the MySQL server

sudo systemctl restart mysql

It should work now.

1 Like