# Thread pool starvation from nested async calls

DevFeed: [Thread pool starvation from nested async calls](<https://devfeed.tech/articles/thread-pool-starvation-from-nested-async-calls-64743.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/63-thread-pool-starvation-nested-async/>)

Author: hello@ankit-rana.com

Published: 2026-10-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Deadlock](<https://devfeed.tech/topics/deadlock.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [queueing theory](<https://devfeed.tech/topics/queueing-theory.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [completablefuture](<https://devfeed.tech/tags/completablefuture.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [deadlock](<https://devfeed.tech/tags/deadlock.md>), [executor](<https://devfeed.tech/tags/executor.md>), [executorservice](<https://devfeed.tech/tags/executorservice.md>), [java](<https://devfeed.tech/tags/java.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [thread-pool](<https://devfeed.tech/tags/thread-pool.md>)

## AI overview

Nested asynchronous work in a bounded Java thread pool can starve the pool when parent tasks block while waiting for child tasks submitted to that same pool. The article explains why increasing pool size only delays the failure and presents alternatives: compose futures without blocking, isolate unavoidable blocking work in a separate bounded pool, use timeouts, and capture thread dumps and queue metrics to diagnose the problem. It also describes the limits of virtual threads for this failure mode.

## Source excerpt

A task that blocks waiting for another task submitted to the same bounded pool can deadlock, because the thread it needs is the thread it is occupying. With N threads and N waiting parents, every thread is blocked on work that has no thread left to run it. Nothing detects this, there is no error and no timeout by default, so the service simply stops responding while looking healthy. Raising the pool size delays it rather than fixing it, since the failure needs only enough concurrent parents to fill the pool.