IBM Support

Error in Watson Studio Local R studio: java.lang.OutOfMemoryError: Java heap space

Troubleshooting


Problem

the following error is returned while executing R code within Watson Studio Local R Studio connecting to Impala/Oracle via JDBC connection 

Error observed :
java.lang.OutOfMemoryError: Java heap space
 GC overhead limit exceeded

Symptom

Error observed :
 : java.lang.OutOfMemoryError: Java heap space
GC overhead limit exceeded

Cause

java.lang.OutOfMemoryError on fetch means that the result set is bigger than the default heap size for rJava: 512MB. It is relatively easy to exceed this maximum size

Environment

Watson Studio Local 1.2.3, RStudio with R 3.4.3

Resolving The Problem

To increase java heap size use the following:

options(java.parameters = "-Xmx4g") where 4g is the size you want to set, it might be different depending on specific needs and availability.

Note: that this step must be performed prior to loading any packages, will be the first line in the code snippet. To have java heap memory change take an effect, the RStudio session should be restarted


Document Location

Worldwide


[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSHGWL","label":"IBM Watson Studio Local"},"Component":"R Studio","Platform":[{"code":"PF043","label":"Red Hat"}],"Version":"1.2.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
IBM Watson Studio Local

Software version:
1.2.3

Operating system(s):
Red Hat

Document number:
1072898

Modified date:
30 December 2019

UID

ibm11072898