Ctrl K
Java · Mid-level · Theory

In production, a service crashes with an OutOfMemoryError every couple of days. How would you go about finding the cause?

~4 min by voice

How to approach it

They're checking whether the candidate can systematically diagnose memory problems in the JVM: tell the OOM types apart, obtain and analyze a heap dump, distinguish a leak from a lack of memory. And not treat the symptoms by increasing Xmx.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsA FastAPI service started responding with delays of several seconds under load, even though the CPU is barely used. The endpoints are declared with async def. How would you find the cause? Mid-levelWhat is the garbage collector in Java, and how does it figure out which objects can be removed? JuniorA user reports a bug in production, but you can't reproduce it. What do you do? Mid-levelAfter a release, the API's 99th percentile response time went from 200 milliseconds to two seconds, while the average barely changed. How would you track down the cause? Mid-levelTell me how memory is organized in the JVM: what's the difference between the stack and the heap, and what's stored where? Junior

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~4 min