Solve JVM memory overflow and jvm memory overflow

Source: Internet
Author: User

Solve JVM memory overflow and jvm memory overflow

Today I encountered a problem. When I restarted Tomcat 6 when adding the configuration file (*. xml) content, the console reported the error: java. lang. StackOverflowError;

That is, stack overflow error.

Memory overflow occurs when the memory used by the program is larger than the maximum memory provided by the virtual machine. Memory overflow depends on the business and system size.

View jvm memory

First, we can view the jvm memory, Enter cmd in the run, and then enter jconsole to open the Java Monitoring and Management Console;

Select Local process connection:

 

There are three methods to solve JVM memory overflow:

First, delete useless configuration files. Reduce configuration files and load memory;

Second, expand the JVM memory.

1. Add-XX: MaxDirectMemorySize = 128 to the JDK configuration in Eclipse;

2. methods to change jvm memory size: java-Xms100m-Xmx250memory;

Third, Tomcat 7 is larger than the default memory set in Tomcat 6, so you can try tomcat7;

 

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.