dataengref errors

Home / Flink / Resources and memory

Flink: IOException: Insufficient number of network buffers

java.io.IOExceptionInsufficient number of network buffers: required 2049, but only 1023 available. The total number of network buffers is currently set to 2048 of 32768 bytes each.

A task could not reserve the network buffers it needs for its input and output channels. The network memory pool of the TaskManager is too small for the parallelism and the number of shuffles running on it.

Causes · Fixes · Source

Common causes

  1. High parallelism with all-to-all shuffles (keyBy, rebalance): the number of channels grows with the square of the parallelism.How to confirm: The required number in the message grows when you raise parallelism.
  2. Many slots per TaskManager share one network memory pool.How to confirm: taskmanager.numberOfTaskSlots is high while network memory is at the default fraction.

How to fix it

Give the TaskManager more network memory.

SettingDefaultNote
taskmanager.memory.network.fraction0.1
taskmanager.memory.network.min64m
taskmanager.memory.network.maxLong.MAX_VALUE bytes

Or reduce demand: lower parallelism for the shuffle-heavy part of the job, or use fewer slots per TaskManager.

Where the message comes from

Message template in the source: Insufficient number of network buffers: required %d, but only %d available. %s.

References

Related errors

Last checked: