Heap memory surplus, but crazy FullGc troubleshooting

Source: Internet
Author: User

Heap memory surplus, but crazy FullGc troubleshooting

A new application cluster has just been launched. On the second and third days, an alert message is sent to the application whose FullGc exceeds the threshold. However, the jvm monitoring of the alarm Java instance is observed. The heap memory usage is only 1 GB, with a surplus of nearly 700 mb. I am confused. If so much memory is not used, it means that the memory is sufficient in the old age!

Execute the jstat-gcutil command for the alert instance process to get the usage percentage of each generation of memory for the java Process.

It is found that the utilization rate of P is 98%, P, that is, Permanent Generation, Permanent Generation. That is to say, the permanent generation usage has exceeded 98%. The problem becomes clear. FullGc, it is easy to think of the memory explosion caused by the Old Generation! But this is not the only condition. permanent memory replacement is also managed by FullGc! Therefore, we strongly recommend that you add permanent monitoring on the monitoring page.

Then run the jstat-gccapacity pid command for this instance. It is found that the permanent generation of this instance is only 82 M. What does 82M mean? The default heap memory size for permanent generation.

Decisively Add the permanent JVM parameter-XX: PermSize = 512 M-XX: MaxPermSize = 512 M-XX: + HeapDumpOnOutOfMemoryError-XX: HeapDumpPath =/export/Logs/im. **. com /. Add the automatic dump parameter for memory OOM.

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.