Eclipse Runtime Java.lang.OutOfMemoryError:PermGen Space Solution

Source: Internet
Author: User
Tags tomcat server

First, in the window eclipse inside the server is TOMCAT6, at the outset, it was thought that the problem of Tomcat configuration, later found that the tomcat inside the configuration of the Catalina.bat file, joined
Set java_opts=-xms512m-xmx1024m-xx:permsize=256m-xx:maxnewsize=108m-xx:maxpermsize=512m
, Eclipse ran or reported java.lang.OutOfMemoryError:PermGen space.
After looking for information on the Internet, to configure in Eclipse can be.
Click "Run" – "Run configurations ...", select Tomcat Server, go to arguments paging, and add the parameters to increase the initial allocation space in the VM arguments
The first step:

Step Two: Add parameters
-xms256m-xmx512m-xx:permsize=256m-xx:maxpermsize=256m

1, PermGen space Introduction

PermGen space is the full name of permanent Generation space, refers to the memory of the permanent storage area Outofmemoryerror:permgen space from the surface is the memory benefits, the solution must be to increase memory.

Tell me why memory benefits:
(1) This section is used to store class and meta information, which is placed in the PermGen space area when loaded, and is different from the heap area where the instance is stored.
(2) GC (garbage Collection) does not clean up permgen space during the main program run time, so if your app will load many classes, PermGen space error is likely to occur. This error is common when the Web server pre-compile the JSP.

If you have a large number of third-party jars under your web app that are larger than the JVM's default size (4M), this error message will be generated.
Recommendation: Move the same third-party jar files to the Tomcat/shared/lib directory, which reduces the memory consumption of the jar document

Second, the deployment of Linux under the time to modify the catalina.sh
java_opts= "$JAVA _opts-server-xms1536m-xmx1536m-xx:permsize=256m-xx:maxpermsize=512m"

Eclipse Runtime Java.lang.OutOfMemoryError:PermGen Space Solution

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.