• Register
0 votes
122 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 5 3
6,930 points

Please log in or register to answer this question.

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

9 7 4
38,600 points

Related questions

0 votes
1 answer 200 views
200 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 56 views
56 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, 2020 LizzyM 6.1k points
0 votes
1 answer 3 views
3 views
Problem: What caused the error, " error: java.lang.outofmemoryerror: gc overhead limit exceeded " ?
asked 3 days ago salim1 39k points
1 vote
1 answer 4 views
4 views
Problem: How to fix this error : java.lang.outofmemoryerror: gc overhead limit exceeded
asked Mar 25 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 11 views
11 views
How can I solve this?
asked Dec 28, 2020 TeamScript 13.5k points
0 votes
2 answers 361 views
361 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
0 votes
1 answer 31 views
0 votes
1 answer 39 views
39 views
What could the reason, why it is working in eclipse and not in standalone?
asked Jan 24 TeamScript 13.5k points
0 votes
1 answer 1 view
1 view
Problem: anyone who know this problem please help? exception in thread "main" java.lang.runtimeexception: stub!
asked 5 days ago Rohit kr 16.2k points
0 votes
1 answer 10 views
10 views
Problem: Can anyone tell me the solution of this problem? exception in thread "main" java.lang.unsupportedoperationexception: not supported yet.
asked Mar 25 Ifra 24.4k points