Java.lang.OutOfMemoryError:PermGen Space

Source: Internet
Author: User

When running a Java project on MyEclipse today, the console displays a Java.lang.OutOfMemoryError:PermGen space error, causing the system to fail to open and report a 500 server internal error message. Find a lot of ways is not solved, first I tried the network on the general method

Method 1: Manually set the MaxPermSize size

Modify Tomcat_home/bin/catalina.sh
Add the following line to the "echo" Using catalina_base: $CATALINA _base "":
Java_opts= "-server-xx:permsize=256m-xx:maxpermsize=512m

Re-run after the change, but the result is still an error. But I happened to see someone describe the problem this way:

It may be that you previously deployed too many projects in the MyEclipse, although it was deleted in MyEclipse, but did not delete in the WebApps folder of Tomcat, resulting in the WebApps folder of Tomcatthe greater the number of items in the polygon, so that even if you match 1 g ,because it will accumulate more and more.
so, to put it simply, it's directly in WebApps .It's erased .projects that have been previously deployed. After all, the average computer is so little memory.
I was also troubled for a long time.

I understand that there may be too many previous projects deployed in my tomcat server where the information is not cleaned up, so it has to be done from the source. So I found the second way:

Method 2:

Click Window-->preferences to locate MyEclipse Tomcat 6, and then click Restore MyEclipse Tomcat Server installation


This is equivalent to cleaning up the data in the server, and then we re-run our project again with no problem.


The above is my solution to the problem, I hope it will be useful to you, thank you!


Java.lang.OutOfMemoryError:PermGen Space

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.