java.lang.OutOfMemoryError: GC overhead limit exceeded

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

via by Unknown author

An easy way to solve OutOfMemoryError in java is to increase the maximum heap size by using JVM options -Xmx512M, this will immediately solve your OutOfMemoryError.

via Stack Overflow by Eugene Yokota

In Eclipse : go to Run --> Run Configurations --> then select the project under maven build --> then select the tab "JRE" --> then enter -Xmx1024m.

This should increase the memory heap for all the builds/projects. The above memory size is 1 GB.

Solutions on the web

via Stack Overflow by Knows Not Much
, 2 years ago
via by Unknown author, 1 year ago
via by Unknown author, 2 years ago
via GitHub by donghwan-shin
, 1 year ago
GC overhead limit exceeded
via GitHub by benoitgaudou
, 1 year ago
Requested array size exceeds VM limit
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuilder.append(Unknown Source)
at java.lang.reflect.Method.specificToStringHeader(Unknown Source)
at java.lang.reflect.Executable.sharedToString(Unknown Source)
at org.junit.internal.MethodSorter$
at org.junit.internal.MethodSorter$
at org.junit.internal.MethodSorter$
at java.util.TimSort.countRunAndMakeAscending(Unknown Source)
at java.util.TimSort.sort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at org.junit.internal.MethodSorter.getDeclaredMethods(
at org.junit.runners.model.TestClass.scanAnnotatedMembers(
at org.junit.runners.model.TestClass.(
at org.junit.runners.ParentRunner.createTestClass(
at org.junit.runners.ParentRunner.(
at org.junit.runners.BlockJUnit4ClassRunner.(
at org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParameters.(
at org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParametersFactory.createRunnerForTestWithParameters(
at org.junit.runners.Parameterized.createRunnersForParameters(
at org.junit.runners.Parameterized.(
at pps.test.Parallelized.(
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

Users with the same issue

2 times, 3 days ago
3 times, 1 month ago
Once, 2 months ago
Once, 2 months ago
2 times, 3 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.