dataengref errors

Home / Flink / Resources and memory

Flink: NoResourceAvailableException: Could not acquire the minimum required resources

org.apache.flink.runtime.jobmanager.scheduler.NoResourceAvailableExceptionCould not acquire the minimum required resources.

The scheduler waited for task slots and gave up. The job needs more slots than the cluster can provide within slot.request.timeout (5 minutes by default), usually because the parallelism is higher than the available slots or TaskManagers cannot start.

Causes · Fixes · Source

Common causes

  1. Parallelism is larger than the total number of slots (TaskManagers × taskmanager.numberOfTaskSlots) in a session or standalone cluster.How to confirm: The Web UI overview shows "Available Task Slots: 0" while the job is in CREATED or RESTARTING.
  2. New TaskManagers cannot be started on YARN or Kubernetes: queue limits, quota, or a container that fails at startup.How to confirm: Check the YARN application attempts or the Kubernetes events for pending or crash-looping TaskManager pods.
  3. TaskManagers keep dying (OOM, heartbeat loss) so slots disappear while the job restarts.How to confirm: The JobManager log shows TaskManagers being released or heartbeat timeouts before this error.

How to fix it

Lower the job parallelism, or add slots by increasing TaskManagers or slots per TaskManager.

SettingDefaultNote
taskmanager.numberOfTaskSlots1
parallelism.default1

Give the resource manager more time to start containers when the cluster is slow to scale.

SettingDefaultNote
slot.request.timeout5 min

If TaskManagers are crashing, fix that first; see the TaskManager heartbeat timeout page.

Where the message comes from

References

Related errors

Last checked: