dataengref errors

Home / Flink / Network and heartbeats

Flink: The heartbeat of TaskManager with id ... timed out

java.util.concurrent.TimeoutExceptionThe heartbeat of TaskManager with id container_1700000000000_0001_01_000002(host:8026) timed out.

The ResourceManager did not hear from a TaskManager within heartbeat.timeout (50 seconds by default) and released it, failing the tasks on it. The TaskManager usually died, froze in a long garbage collection, or lost network connectivity.

Causes · Fixes · Source

Common causes

  1. The TaskManager process was killed, for example by the YARN or Kubernetes memory limit (container killed, OOMKilled).How to confirm: Check the container exit code or pod status; exit code 137 or OOMKilled means the process exceeded its memory limit.
  2. Long garbage collection pauses blocked the heartbeat thread.How to confirm: Enable GC logging on the TaskManager and look for pauses close to the timeout.
  3. Network problems or an overloaded host.How to confirm: The TaskManager log continues normally but shows connection errors to the JobManager at the same time.

How to fix it

If the container was killed for memory, give the TaskManager more process memory or more managed or overhead memory, depending on which pool is exhausted.

SettingDefaultNote
taskmanager.memory.process.sizenone
taskmanager.memory.jvm-overhead.fraction0.1

Tolerate longer pauses while you investigate GC or network issues.

SettingDefaultNote
heartbeat.timeout50 s
heartbeat.interval10 s

Where the message comes from

Message template in the source: The heartbeat of TaskManager with id %s timed out.

References

Related errors

Last checked: