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