Skip to main content

How do you identify and resolve memory leaks through performance testing?

  • memory leaks
  • soak testing
  • profiling

Answer it first, then compare. Nothing here is saved or scored.

Model answer

Detection: (1) Soak test: run steady load for 4-24 hours, monitor memory usage trends. (2) A consistent upward trend in memory without corresponding load increase indicates a leak. (3) Monitor garbage collection frequency and duration. Resolution: (4) Use profiling tools (Node.js heap snapshots, Chrome DevTools, Java VisualVM). (5) Compare heap snapshots at intervals to find growing objects. (6) Common causes: unclosed connections, event listener accumulation, growing caches without eviction, global variables. (7) After fix, re-run soak test to verify memory is stable.

What interviewers listen for

  • Workload modelling
    You design the load shape from product traffic, not from tool defaults.
  • Percentile literacy
    You read p50/p95/p99 separately and explain why each matters.
  • Bottleneck triage
    You correlate metrics across application, database, and infrastructure layers.
  • Capacity instincts
    You can translate a soak test into a sizing or scaling recommendation.

Terms to know

See all 35 performance questions

Written by , Senior QA Automation Engineer, 50+ QA candidate interviews conductedLast updated July 2026