- Published on
Fix: java.lang.OutOfMemoryError: GC overhead limit exceeded
- Ashik Nesin
If you're working on a large Java-based codebase then chances are at one point in time, you might run into this error when you try to run it using your IDE like IntelliJ IDEA
Module example production: java.lang.OutOfMemoryError: GC overhead limit exceeded
This is caused due to memory issues. In that case, we'll need to configure it properly.
Here is how to do that in IntelliJ IDEA.
Go to Preferences -> Compiler -> Set the Shared to build process heap size (Mbytes) to something like 7000 (depending our your RAM)
And that should resolve the memory issue for you going forward.
Happy optimized memory!