• Register
search
Log In
0 votes
88 views

Problem :

I am getting bellow error while I execute my JUnit tests

exception in thread "main" java.lang.outofmemoryerror: gc overhead limit exceeded

6.9k points
edited by

1 Answer

0 votes

Solution: 

The Garbage Collector throws this exception when a lot of time is spent in garbage collection for very small return, e.g. 98% of CPU time spent on GC and 2% of heap is recovered.

The purpose behind this feature's designe is to prevent applications from running for an longer period of time while making very little or no progress because the heap is too small.

One can turn this feature off with the command line option 

-XX:-UseGCOverheadLimit

Further Readings:

https://github.com/rdfhdt/hdt-java/issues/58

36.1k points
edited by

Related questions

0 votes
1 answer 143 views
143 views
Problem : I am getting bellow minecraft error minecraft error: java.lang.outofmemoryerror: gc overhead limit exceeded
asked Oct 23, 2019 peterlaw 6.9k points
1 vote
1 answer 22 views
22 views
Problem: I got error while applying weblogic patch useing bsu.sh: patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=GFWX -prod_dir=$FMW_HOME/wlserver_10.3 -log=$FMW_HOME/utils/bsu/bsu_weblogic.log Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded ... .bea.plateng.patch.Patch.main(Patch.java:281) Can anyone explain me this and help me to solve this error?
asked Mar 27 LizzyM 5.7k points
0 votes
2 answers 112 views
112 views
Problem : I am getting bellow memory error java.lang.outofmemoryerror requested array size exceeds vm limit
asked Nov 5, 2019 peterlaw 6.9k points
1 vote
1 answer 17 views
17 views
Problem: I am a begginer in java programming language and I have been coding for just some days. To practice my programming I wrote this code in java: public class Main { public static void main(String[] argv){ int 2count, h-l, a/b, } } But It shows me the error message ... , . expected Syntax error on token ",", ;expected at Main.main(Main.java:3) Whats is wrong in my code can anyone help me out?
asked Apr 6 LizzyM 5.7k points
1 vote
1 answer 16 views
16 views
Problem : I have very recently started to learn programming in Java. I am trying to execute my java code but I am facing the below error. “Exception in thread "main" java.lang.arrayindexoutofboundsexception:” I am unable to understand above error. Please find below my code: ... according to my debugger*/ myodd[j] = input[i]; j++; } return myodd; } Please help me in fixing above error.
asked Mar 30 morrisBson 3.2k points