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.
Common causes
- 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.
- 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.
- 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.
| Setting | Default | Note |
|---|---|---|
taskmanager.numberOfTaskSlots | 1 | |
parallelism.default | 1 |
Give the resource manager more time to start containers when the cluster is slow to scale.
| Setting | Default | Note |
|---|---|---|
slot.request.timeout | 5 min |
If TaskManagers are crashing, fix that first; see the TaskManager heartbeat timeout page.
Where the message comes from
DeclarativeSlotPoolBridge.javainapache/flinkatrelease-2.3.0- Message checked in Flink 2.3.0