You are on page 1of 3

How to fix 'java.lang.OutOfMemoryError? https://basecamp.temenos.com/s/article-detail/a042K00001LAta0QAD/how-to-fix-javalangou...

((//ss//)) C
Coom
mmmu
unniittyy LLeea
arrn
n PPrro
oddu
uccttss TTrra
aiin
niin
ngg D
Doow
wnnllo
oaad
dss SSu
uggg
geesstt ((//ss//iid
deea
attiio
onn))

How to fix 'java.lang.OutOfMemoryError?


Explore product details, discuss issues, find the latest news, and
contribute to best practices.

How to (/s/how-to)  >  How to fix 'java.lang.OutOfMemoryError?

        
Rate Like Bookmark

(/s/profile/0056A000000izetQAA) H
Hoow
w tto
o f i xx ' j a
avva
a..l a
anng
g..O
OuuttO
OffM
Meem
moorryyE rrrro
orr??
Vinay Jain - Admin (/s/profile/0056A000000izetQAA)  •  Apr 06, 2021  •  Technology > Core Infra > System Core (EB)

      24

How to fix  'java.lang.OutOfMemoryError: GC overhead limit exceeded'?

The error "java.lang.OutOfMemoryError: GC overhead limit exceeded" is another type of OutOfMemoryError in Java which comes when JVM spent too much time doing
garbage collection without any success.  For example, if almost 98% of CPU for a Java process is busy doing GC and reclaims a small amount of Java heap space around
2%, then JVM throws "java.lang.OutOfMemoryError: GC overhead limit exceeded" error. Though, the definition of 98% CPU time may vary between different Garbage
collector and different JVM version. Unlike other java.lang.OutOfMemoryError: Java heap space and java.langOutOfMemory: Permgen space, this is not so frequent and
you will rarely encounter this error in your Java application, but this also denotes resource exhaustion.
As we know, Java Virtual Machine performs memory management and can have a significant effect on your performance depending on how you configure the JVM. The
most important settings for the JVM are the initial heap size and maximum heap size. The initial heap size represents the amount of memory that the JVM uses on startup;
the maximum heap size represents the amount of memory that the JVM can use.
When JVM starts JVM heap space is the initial size of Heap specified by -Xms parameter, as application progress objects creates and JVM expands Heap space in Java to
accommodate new objects. JVM also run garbage collector to reclaim memory back from dead objects. JVM expands Heap in Java somewhere near to Maximum Heap
Size specified by -Xmx and if there is no more memory left for creating a new object in java heap, JVM throws java.lang.outofmemoryerror and your application dies. To
resolve the error, the Heap size of the JVM can be slightly increased based on the system load in the Jboss’s “run.conf” file (jboss/bin) as shown below.  
If lower versions of Jboss such as 4.2.3, 5.1 and 5.2, in run.conf(if unix/linux) or run.conf.bat(if windows), slightly increase the -Xmx value to 3GB as given below. 
  
if [ "x$JAVA_OPTS" = "x" ]; then 

1 of 3 2/10/2023, 8:50 PM
How to fix 'java.lang.OutOfMemoryError? https://basecamp.temenos.com/s/article-detail/a042K00001LAta0QAD/how-to-fix-javalangou...

   JAVA_OPTS="-Xms128m -Xmx3096M -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000


-Dsun.rmi.dgc.server.gcInterval=3600000"  ((//ss//)) C
Coom
mmmu
unniittyy LLeea
arrn
n PPrro
oddu
uccttss TTrra
aiin
niin
ngg D
Do ow
wnnllo
oaad
dss SSu
uggg
geesstt ((//ss//iid
deea
attiio
onn))
Fi 
  
If it’s Jboss EAP versions, slightly increase the –Xmx value to 3GB in standalone.conf.bat (if windows) or standalone.conf(if unix/linux) 
  
if [ "x$JAVA_OPTS" = "x" ]; then 
   JAVA_OPTS="-Xms1303m –Xmx3096m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true" 
   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true" 
else 
… 
… 
If lower versions of Jboss such as 4.2.3, 5.1 and 5.2, in run.conf(if unix/linux) or run.conf.bat(if windows), slightly increase the -Xmx value to 3GB as given below,
if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Xms128m -Xmx3096M -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000"
Fi
If it’s Jboss EAP versions, slightly increase the –Xmx value to 3GB in standalone.conf.bat (if windows) or standalone.conf(if unix/linux).
if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Xms1303m –Xmx3096m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"
   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
else


 
For example, here maximum heap size specified as 3096M. Depending on the free memory available in the RAM this JVM size can be increased.
After changing the heap size, please restart the Jboss server to take effect.
NNoottee::
• The above value is provided as an example. Based on your architecture/flow, kindly increase accordingly.
• Additionally, we request you to coordinate with your Jboss/system administrator to change according to the server architecture.  below.

Last Updated: 02-May-2018 

0 Comments

PPo
osstt Q
Quueessttiio
onn

Share an update... Share

2 of 3 2/10/2023, 8:50 PM
How to fix 'java.lang.OutOfMemoryError? https://basecamp.temenos.com/s/article-detail/a042K00001LAta0QAD/how-to-fix-javalangou...

Sort by:

Most Recent Activity ((//ss//)) C


Coom
mmmu
unniittyy LLeea
arrn
n PPrro
oddu
uccttss
Search this feed...
TTrra
aiin
niin
ngg D
Doow
wnnllo
oaad
dss SSu
uggg
geesstt ((//ss//iid
deea
attiio
onn))

Collaborate here!
Here's where you start talking with your colleagues about this.

Supplier Information Terms of use Base Camp FAQ


www.temenos.com (https://www.temenos.com (https://www.temenos.com (https://basecamp.temenos.com Follow US
nformation /information-for- /legal-information /s/article-detail
suppliers/) /website-terms-and- /a046A000001lZe4QAE/temenos- (https://www.linkedin.com (https://www.linkedin.com (
conditions/) base-camp-faq) /company/temenos) /company/temenos/) /Temenos

3 of 3 2/10/2023, 8:50 PM

You might also like