In R Studio using R, when trying to join 2 tables which have about 100k records(DB2 DB)
, getting below error and none of the google solutions worked.
Error 'in .jcall(x, "S", "getMessage")': java.lang.OutOfMemoryError: GC overhead limit exceeded
I had this problem several times, sometimes randomly. What helped me so far was using the following command at the beginning of the script before loading any other package!
options(java.parameters = c("-XX:+UseConcMarkSweepGC", "-Xmx8192m"))
The -XX:+UseConcMarkSweepGC
loads an alternative garbage collector which seemed to make less problems than the standard GC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With