At the moment remote agents times out after not being able to contact the server for 15s. This happens quite regularly when load on the agent is high.
To fix this issue, we're increasing the thread priority of the heartbeat, increasing the default timeout and also making this value configurable.
The heartbeat thread has the top priority on the agent, the timeout is set to 60 seconds and is configurable through the bamboo.agent.heartbeatTimeoutSeconds property