Skip to main content

JVM heap memory error

  • March 21, 2014
  • 5 replies
  • 30 views

Said_Montiel
Forum|alt.badge.img+1
I know this isn't entirely about Vertica, but i guess this is a good place to ask this. While performing scalability testing on a UDF using PARTITION BY we encountered an error

Error in .jcall(rp, "[D", "getDoubles", i) : 
java.lang.OutOfMemoryError: Java heap space

Similar errors have appeared such as 

java.lang.OutOfMemoryError: GC overhead limit exceeded


Help?


5 replies

Said_Montiel
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • March 21, 2014
I forgot to mention, we're using JDBC to connect and test

Bhawana
Forum|alt.badge.img
  • Participating Frequently
  • March 21, 2014
Hi,

You can adjust the JVM memory settings by editing /opt/vertica/bin/mctl
I would recommend the following adjustments to start:Original Line: $JAVA_HOME/bin/java -Dvertica.home=$VERTICA_HOME -Djava.library.path=$VERTICA_HOME/lib -Dderby.system.home=/opt/vertica/mcdb/derby -Xmx2048m -Xms1024m -XX:MaxPermSize=256m -jar $VERTICA_HOME/lib/webui.war & Updated Line:$JAVA_HOME/bin/java -Dvertica.home=$VERTICA_HOME -Djava.library.path=$VERTICA_HOME/lib -Dderby.system.home=/opt/vertica/mcdb/derby –Xmx3096m -Xms1512m -XX:MaxPermSize=256m -jar $VERTICA_HOME/lib/webui.war & Once you have made the change, please restart the Management Console for the new settings to take effect.


Regards,

Bhawana


Said_Montiel
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • April 7, 2014
Thanks for the tip. We increased the heap size to 1GB and it run just fine. On a second test the heap size happened again even with the memory set to 1GB.

Nothing changed between tests.

Charles_Daringe
http://stackoverflow.com/questions/5839359/java-lang-outofmemoryerror-gc-overhead-limit-exceeded
I'll spare the fine detail of memory blocks and heap and stack in C# but the answer is at the link I provided When you get to large data compute happens at the disk and "reducing the process" gets you done quicker. It is better to break up the process into smaller steps if possible.

Karl_1
  • New Participant
  • June 4, 2014