0

I have 64GB of RAM on my centos 7 server. One of my application has 4096mb of JVM heap size but keep getting java.lang.OutOfMemoryError: GC overhead limit exceeded exceptions frequently. What is the relationship between RAM and JVM heap size so that I can expand it accordingly.

MbaiMburu
  • 875
  • 1
  • 10
  • 19
  • How much RAM you have doesn't determine how much memory your program needs. If your program needs more memory, you have to either increase the maximum or optimise the program to use less. – Peter Lawrey Jul 26 '18 at 08:43

1 Answers1

0

Issue is with the Heap Size. You can increase the heap size. Following are few options available to change Heap Size.

-Xms<size>        set initial Java heap size
-Xmx<size>        set maximum Java heap size
-Xss<size>        set java thread stack size
 **For Example :-**
-Xms512m
-Xmx2024m
-XX:MaxPermSize=700m
-XX:ReservedCodeCacheSize=480m
Hasnain Ali Bohra
  • 2,130
  • 2
  • 11
  • 25