Tuesday, July 3, 2018

GC overhead limit exceeded

The error, GC overhead limit exceeded, happens when the JVM is spending too much time doing garbage collection and not much memory is recovered. If the JVM spends more than 98% of its time doing GC and less than 2% of the heap memory is recovered, it will throw such an error. This means the speed of GC cannot catch up with the speed the heap memory being filled, resulting in the CPU is spending all its time with GC and no actual work is done; applications normally takes only milliseconds will now take minutes to finish.

You need to check your application to programmatically release whatever the memory it can after a process is done.

You can increase the heap size by setting the minimum and maximum memories

        -Xms128m -Xmx800m

You can also use parallel garbage collections.

       -XX:ParallelGCThreads=20 or -XX:+UseParallelGC

-----------------------------------------------------------------------------------------------------------------

                        


If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.


No comments:

Post a Comment