PermGen out of Memory - Netbeans

859 views Asked by At

I am implementing a mavenized web spring MVC app. As IDE I use Netbeans and for deployment Apache Tomcat 7.0

The past four hours I keep receiving

java.lang.OutOfMemoryError: PermGen space.

What I have done to solve the issue, so far, with no luck are:

1)Restart Tomcat

2) Edit Netbeans.conf adding something like this

-J-Xms512m -J-Xmx512m -J-XX:PermSize=512m

or this

-J-Xms128m -J-Xmx128m -J-XX:PermSize=128m -J-XX:+UseConcMarkSweepGC -J-XX:+CMSPermGenSweepingEnabled -J-XX:+CMSClassUnloadingEnabled -J-XX:MaxPermSize=128m

3)In Netbeans:

Project Properties-> Actions-> Run->-Xms512m -J-Xmx512m

4)Finally, I restarted my computer.

What am I doing wrong? What else could it be? Until yesterday the web app worked pretty well. Since then, I haven't done any changes.

Any help is appreciated, I do not know how to 'un'-stuck. Thank you.

1

There are 1 answers

2
AudioBubble On

Its better Add this

-XX:+UseConcMarkSweepGC
-XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize=128m