Skip to content

How to deal with Media Driver timeouts

Problem

Your process fails with a DriverTimeoutException.

Solution

First, investigate why the Media Driver timeout occured in the first instance. Then, if confirmed that it should have a longer timeout, increase the timeout with the environment variable aeron.driver.timeout (or set it on the Media Driver and Aeron configuration contexts).

Discussion

Media Driver Timeouts tend to happen for one of two reasons:

  • the Media Driver is not running, or
  • the system is resource starved.

If you're finding that the system is resource starved, and you're certain that the starvation was caused by your Aeron based process, investigate if the Idle Strategies you've set are not too aggressive for the host you're running on. It is typical to define different Idle Strategies for different environments - for example, local development may be configured very differently to production. Additionally, investigate if the Media Driver threading mode can be reduced to SHARED.

Setting the timeout to a large number will increase the time the system takes to detect a failed Media Driver. The timeout defaults to 10 seconds.

See Also