Interview practice question
Node.js crashes with heap out of memory
Backend Engineering · Language Runtimes · Intermediate
Your Node.js service crashes every few hours with "JavaScript heap out of memory". How do you find the cause?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Monitor heap growth over time.
- Take heap snapshots and compare.
- Look for retained objects: caches, listeners, closures.
- Check large payload handling.
- Fix leak; set max-old-space-size appropriately.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.