Skip to interview prep
Apexed

86. A build stays below a per-process heap setting but exceeds the container's memory limit. How would you investigate?

HardDebugging & production

Technical
Show model answer

Measure the whole process tree and identify overlapping compiler workers, native allocations and other memory outside the heap. A per-process heap limit is neither an aggregate memory quota nor a measure of resident memory.

Correlate peaks with build stages, then test a bounded change such as reducing concurrency or separating stage lifetimes. Keep source, dependencies and limits fixed, and distinguish a successful local experiment from proof on the target container.

What interviewers listen for

  • Measure aggregate and native memory
  • Correlate peaks with compiler stages
  • Validate under unchanged target limits
A build stays below a per-process heap setting but exceeds the container's memory limit. How would you investigate — Software engineering interview question — A