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;