MySQL crash loop: InnoDB io_setup() EAGAIN — Cannot initialize AIO sub-system (host AIO exhaustion)
meydanelektrikdigital
HOBBYOP

a month ago

Hi Railway team,

I wanted to report an issue with my MySQL service (deployed from the official mysql image via the zero-config template) and let you know I've already worked around it.

On June 10, 2026, my MySQL container started crash-looping on startup. It never reached "ready for connections" — InnoDB failed during initialization with:

[InnoDB] io_setup() failed with EAGAIN after 5 attempts.

[InnoDB] Cannot initialize AIO sub-system

[Server] Failed to initialize DD Storage Engine / Aborting

This looks like host-level AIO context exhaustion (aio-max-nr limit reached on the underlying host), not anything wrong with my data or volume — the volume mounted fine every time. Restarting did not help, since each restart hit the same exhausted AIO pool.

Resolution: I added a custom start command disabling native AIO and the service is now stable:

docker-entrypoint.sh mysqld --innodb-use-native-aio=0

Flagging it in case other MySQL services on the same host are affected, and in case raising aio-max-nr on the host (or defaulting the standard MySQL template to native AIO off, as your optimized template already does) would prevent this for others.

Thanks!

Under Review

0 Threads mention this feature

0 Replies

Welcome!

Sign in to your Railway account to join the conversation.

Loading...