Java. Lang. outofmemoryerror: Java heap space (heap memory overflow)

Source: Internet
Author: User
Tags xms

This exception is thrown if 98% is used for GC and the available heap size is less than 2% in JVM.
JVM heap setting refers to the setting of memory space that JVM can allocate during Java program running. the JVM automatically sets the heap size value at startup. The initial space (-XMS) is 1/64 of the physical memory, and the maximum space (-xmx) is 1/4 of the physical memory. You can use options such as-xmn-XMS-xmx provided by JVM to set the configuration.

I use myeclipse 8.6. The solution is as follows:

Myeclipse ---, window ---, preferences --- myeclipse ---, servers ---, Tomcat ---, select the tomcat version you are using ---, JDK ---, set the following in optional Java VM arguments on the right content:

-Xms256m-xmx256m

That's all! Thank you for reading this 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.