Eclipse error GC overhead limit exceed, stutter

Source: Internet
Author: User
Tags gc overhead limit exceeded

When you use the Build Project feature of Eclipse, you are prompted with the following error:
An internal error occurred during: "Build Project". GC Overhead limit exceeded

Search for a bit, is belong to Java.lang.OutOfMemoryError.
Oom Everyone knows, is the JVM memory overflow, that GC overhead limit exceed?

GC Overhead LIMT Exceed check is a strategy defined by hotspot VM 1.6 to predict whether or not to oom by counting GC time, and to throw an exception early to prevent Oom from happening. Sun officially defines this as: "The parallel/concurrent collector throws Outofmemroyerror when the GC is recycled too long." The long definition is that more than 98% of the time is spent doing GC and recovering less than 2% of heap memory. Used to avoid too little memory to cause the app to not work properly. “

Sounds useless ... What's the use of predicting oom? At first, this thing can only be used to catch and release memory resources, to avoid the application hanging out. It turns out that this strategy is not going to save your app in general, but you can make a final struggle before the app hangs up, such as data saving or saving the site (Heap Dump).

And sometimes this strategy also poses problems, such as frequent oom when loading some large memory data.

* * Used for a year or two, today suddenly encountered this problem, perhaps not previously noticed.
In fact, if it is not very frequent appearance, do not need to pay attention to it, direct click OK. **
The following pop-up prompts are:

If you are worried about unsaved changes, just click No and restart eclipse after the check is complete.

Workaround:
The reason is that the eclipse default configuration memory is too small to change the Eclipse.ini file under the Eclipse installation folder.

Eclipse.ini default files are as follows:

Modify the following:

-xms1024m-xmx2048m

The first is the smallest initialization memory and the second one is the largest occupied memory

You can also add-xx:maxpermsize=2048m, which means that you always have the maximum memory when compiling a file, restarting eclipse

Eclipse error GC overhead limit exceed, stutter

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.