How to deal with Media Driver timeouts¶
Your process fails with a
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).
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.