-
Notifications
You must be signed in to change notification settings - Fork 55
Error java.lang.OutOfMemoryError: GC overhead limit exceeded
You receive the exception with similar text while running VarDictJava:
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at com.astrazeneca.vardict.VarDict.vardictParallel(VarDict.java:348) at com.astrazeneca.vardict.VarDict.nonAmpVardict(VarDict.java:314) at com.astrazeneca.vardict.VarDict.start(VarDict.java:72) at com.astrazeneca.vardict.Main.run(Main.java:152) at com.astrazeneca.vardict.Main.main(Main.java:31) Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.String.substring(String.java:1969) at com.astrazeneca.vardict.Utils.substr(Utils.java:133) at com.astrazeneca.vardict.ReferenceResource.getREF(ReferenceResource.java:96) at com.astrazeneca.vardict.ReferenceResource.getREF(ReferenceResource.java:55) at com.astrazeneca.vardict.VarDict$VardictWorker.call(VarDict.java:1020) at com.astrazeneca.vardict.VarDict$VardictWorker.call(VarDict.java:998) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
It appears when you use the region that is too big to be held in memory at once.
If you use BED file, check that it doesn't contain too long regions (like the whole chromosome or 1 000 000+ bases). The solution is to split these regions in BED file to smaller.
If you use -R option, you have to set smaller regions.
You can increase the heap space for Java by setting VAR_DICT_OPTS environment variable, or changing DEFAULT_JVM_OPTS variable in VardictJava/build/install/VarDict/bin/VarDict
script. -Xmx768m JVM option sets heap size to 768 Mbytes, you could change it, for example, to -Xmx4g to give JVM 4Gb of RAM, or even more depends on your environment.