Tomcat6: Java. Lang. outofmemoryerror permgen Space

Source: Internet
Author: User
Reference http://www.blogjava.net/lifw/archive/2009/03/04/257854.html

1. Set tomcat6w.exe

Add in Java options:
-XX: permsize = 256 m
-XX: maxpermsize = 512 m

2. Configure in environment variables:

Environment variable:-xms512m-xmx1024m-XX: permsize = 256 m-XX: maxpermsize = 512 m

Environment variable name: java_opts

3. Non-installed edition settings are as follows:

Modify tomcat_home/bin/Catalina. Sh
Add the following line to "Echo" using catalina_base: $ catalina_base ": java_opts ="-server-XX: permsize = 256 m-XX: maxpermsize = 512 m

The full name of permgen space is permanent generation space, which refers to the permanent storage area of the memory. This memory mainly stores class and meta information, when a class is loaded, it will be placed in the permgen space. It is different from the heap region where the class instance is stored. GC (garbage collection) permgen space is not cleaned up during the main program running period. Therefore, if the app loads many classes, the permgen space error may occur, this error occurs when the pre-Compile of JSP on the Web server exceeds the default JVM size (4 MB ).

Suggestion: Move the same third-party jar files to the tomcat/shared/lib directory to reduce the memory usage of jar files. Specific memory usage can be set by computer memory.

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.