Skip to content
Ameen Abozaid
Planned lessonSRC-015-L02

Thread starvation

  • Lesson 2 of 8
  • Senior C
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

recognize and diagnose exhausted thread pools.

Planned topics

  • Symptom: latency climbs while CPU stays low; requests queue.
  • Causes: blocking calls on a small pool, a slow dependency holding threads, a pool used for both work and waiting (pool deadlock).
  • Evidence: take thread dumps a few seconds apart; many threads waiting in the same call point to the culprit; check pool queue depth and active counts metrics.
  • Fixes: timeouts, bulkheads (separate pools per dependency), bounded queues with load shedding, virtual threads for blocking I/O where suitable (verify version support and pinning issues).
Draft outline details

Demonstration

Thread dump excerpt: 200 http-nio-exec threads in WAITING inside a payment client read(). Interpretation: dependency slowness plus no timeout.

Check your understanding

CPU is low yet requests are slow. What do you suspect?

Show answer

Threads blocked waiting, such as pool exhaustion from a slow dependency.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.