Interview practice question
Metaspace grows with every redeploy
Backend Engineering · Language Runtimes · Experienced
Your Java application server's metaspace grows each time an application is hot-redeployed, until it crashes with OutOfMemoryError: Metaspace. Why?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Classloader leak.
- Old classloader still referenced (threads, ThreadLocals, static caches, drivers).
- Classes can't be unloaded.
- Find with heap dump GC roots.
- Prefer full process restarts in containers.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.