Skip to content

Media Driver operations are slow on Mac just after launch


NameResolver time tracking was introduced with Aeron 1.42.0. See Aeron Tooling


You are running on macOS, and are seeing:

  • step=-1 cluster timeouts
  • io.aeron.exceptions.DriverTimeoutException in a stack trace
  • otherwise very slow MediaDriver bound operations (such as AddSubscription), in particular in the moments after the Media Driver has been launched.


If you do not have your machine's hostname defined in /etc/hosts on your Mac, add it for both IPv4 and IPv6. For example: Your-MacBook-Pro.local
::1 Your-MacBook-Pro.local


$ hostname

Then save the file and flush your DNS with:

dscacheutil -flushcache


Calls to can take extended periods on macOS when there is no entry for the local host in /etc/hosts. Aeron makes use of this when looking up the local hostname when launching the Media Driver. This same slow local host lookup issue has impacted other open source projects built on Java, such as Spring and Tomcat as well.

See Also

Stack Overflow