This is the newly added Error Type of JDK 6. It occurs when GC occupies a large amount of time to release a small space, and is a protection mechanism. Solution: disable this function and use ---XX:-UseGCOverheadLimit
Sun official explanation:
The parallel/concurrent collector will throwOutOfMemoryError
If too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an outofmemoryerror will be thrown. this feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. if necessary, this feature can be disabled by adding the option-XX:-UseGCOverheadLimit
To the command line
I. Exceptions:
Exception in thread "Main" Java. Lang. outofmemoryerror: GC overhead limit exceeded
Ii. Explanation:
Jdk6 adds an error type. It is thrown when GC is used to release a small amount of space and takes a lot of time.
Generally, the heap is too small. Cause of exception: insufficient memory.
Iii. solution:
1. Check whether the system has code or an endless loop using large memory.
2. You can add JVM startup parameters to limit the memory usage:-XX:-usegcoverheadlimit.