GC overghead limit exceeded

Source: Internet
Author: User
Tags gc overhead limit exceeded

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 throwOutOfMemoryErrorIf 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:-UseGCOverheadLimitTo 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.