Linux configuration memory still reported memory overflow--Solution

Source: Internet
Author: User

in the Linux environment, TOMCAT7, deploy the war package. Start Project times Java.lang.OutOfMemoryError:PermGen Space exception


the full name of PermGen space is permanent Generation space, which refers to the permanent storage area of memory,
this memory is primarily stored by the JVM with class and meta information, and class is placed in PermGen space when it is loader .
Unlike the heap area where the class instance (Instance) is stored, the GC (garbage Collection) does not operate on the main program
PermGen space for cleanup.

Workaround: Set the MaxPermSize size
java_opts= "-xms256m-xmx512m-xss1024k-xx:permsize=128m-xx:maxpermsize=256m"
usually we just copy the Set statement tomcat-"bin-" catalina.sh

the startup process was not reported as abnormal but could not be accessed after the modification. See backstage, still reported memory overflow, but not java.lang.OutOfMemoryError:PermGen space, but
Java.lang.OutOfMemoryError:Java Heap Space
This is because the JVM's memory was not successfully configured.

Solution: Change the location of the set MaxPermSize statement

to add a catalina.sh in Tomcat under the bin, position cygwin=false before

# OS specific support. $var _must_ BES set to either True or false.
java_opts= "-xms256m-xmx512m-xss1024k-xx:permsize=128m-xx:maxpermsize=256m"
Cygwin=false

Linux configuration memory still reported memory overflow--Solution

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.