Different causes for OOM
Every one in java development face java.lang.OutOfMemoryError now and then, OutOfMemoryError in Java is one problem which is may be due to
- Improper memory management by the Java code
- Insufficient hardware memory available to process the code
- Programming mistakes
- Memory leak
Types of OOM
Any of the above reason can result into OutOfMemoryError. Following three different types of OOM errors are common
- Java.lang.OutOfMemoryError: Java heap space
- Java.lang.OutOfMemoryError: PermGen space
- Java.lang.OutOfMemoryError: GC overhead limit exceeded
OOM in Talend
From above the last error I observed during flat file data migration to database using Talend Open Studio. File sizes were in the range of 10 MB-500MB in size. Initially job worked well, but when started with larger files of around 100MB, this error popped up. Hardware memory (RAM) available was 16 GB. But default memory allocated by Talend was Xmx1024m (1GB). There was a possibility to increase Xmx to 10240m which could have solved the issue, but this GC overhead limit exceeded was related to garbage collection.
Resolution
Following workaround solved the problem in Talend without increasing the memory limit to higher figures.
Add new option to Windows–>Preferences–>Talend–>Run/Debug – XX:-UseGCOverheadLimit
Best Open Source Business Intelligence Software Helical Insight is Here