Code Room
On-callHardoc-g462
Subject Thread pool exhaustionLevel Senior–Staff~40 minCommon in Concurrency · Distributed systems interviewsIndustries Technology, Software development

Question

A Java service handles most requests fine, but a subset of requests that fan out work using `list.parallelStream()...` intermittently hang for many seconds across the WHOLE service — even simple requests that don't use parallel streams slow down at the same time. CPU is moderate. A thread dump shows the JVM's ForkJoinPool.commonPool worker threads all parked/blocked inside network or DB calls. A recent change added a blocking remote call inside the lambda passed to a `parallelStream()`. How do you triage and mitigate?

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

Diagram & narrate the incident
Loading whiteboard…
Run or narrate your approach, then ask the coach.