Solve the problem of MyEclipse newspaper PermGen space anomaly

Source: Internet
Author: User
Tags tomcat server

Recently developed using Eclipse, the server used was Tomcat, but in the start times the caused By:java.lang.OutOfMemoryError:PermGen space exception.

This error is very common, so configure Tomcat under the Catalina.bat, configuration Eclipse.ini, various methods have been used, not work! It took a long time, in the near collapse of the time to find the following solution, finally solved.

In order not to Detour, I write three methods, I use the third method to solve.

Method/Step
  1. 1

    The first method: Modify the Catalina.bat in the Tomcat/bin directory.

  2. 2

    Join under "REM-----Execute The requested Command----------------------"

    java_opts= "-server-xms800m-xmx800m-xxnewsize=256m-xx:permsize=256m-xx:maxnewsize=512m-xx:maxpermsize=512m" .

    This approach works when you use Tomcat only, but it doesn't work when you use Eclipse.
  3. 3

    The second method: Modify the Eclipse.ini.

  4. 4

    Join

    -vm

    D:/jdk6/bin/javaw.exe

    -vmargs

    -dosgi.requiredjavaversion=1.5

    -xms512m

    -xmx1024m

    -xx:permsize=256m

    -xx:maxpermsize=512m

    This method sometimes works, but this time it does not work, the specific reasons I do not know, I guess it may be written above this paragraph with the launch of the Tomcat server in eclipse does not matter, so can not solve the problem of Tomcat error.

  5. 5

    Third method: Modify Eclipse's Run configurations.

  6. 6

    Click "Run"-"Run Configurations" and click on the "Arguments" tab in the window that opens.

  7. 7

    In VM arguments, enter the bottom of the content:

    -xms256m-xmx512m-xx:maxnewsize=256m-xx:maxpermsize=256m

  8. 8

    After saving again after restart, no more error.

    It was this method that solved my problem in good condition.

Solve the problem of MyEclipse newspaper PermGen space anomaly

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.