0

I know that there are thousand of questions about this error but I haven't found a solution for my problem. I have three web applications deployed in a server. This applications are made with java, spring framework and hibenate. My server has tomcat6 and opendjdk 1.7. As I said before, after use my applications for a time, appears the OutOfMemoryError: Permgen space. In all solutions that I read suggest that change de option MaxPermSize with the command:

JAVA_OPTS="-XX:PermSize=256m -XX:MaxPermSize=512m"

or

java -XX:PermSize=256m -XX:MaxPermSize=512m

I tried put the first command on the file tomcat6.conf of my server and as a file setenv.sh, I tried the second directly in the command line but none of this solutions works. When I execute the command:

java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize|ThreadStackSize'

The values of my PermGen Space is the same before I tried change it. I have spoken with de administrator of my server and he says that this values can't change because are based in a percentage of the total of memory system and the unique way for change them is increase the memory of the system. I'm confused becasue my administrator says one thing and the solutions that I read says other. Can change this values? How I can increase the value of PermGen?

Jonathan
  • 121
  • 2
  • 11
  • Permgen is removed in Java8, maybe you could give it a try? – Antoniossss Apr 13 '16 at 20:21
  • My applicatios are tested with java 7. I don't know if update the version of java can produce that my applications doesn't works for incompatibilities between versions of dependencies of my applications and java 8. – Jonathan Apr 13 '16 at 21:41
  • Java is backward compatible. The is only a small exception from this rule but it is easy fixable and will only occure if you compile your app with JDK8 targeting 1.7 and run it on 1.7 JVM. http://stackoverflow.com/questions/32954041/concurrenthashmap-crashing-application-compiled-with-jdk-8-but-targeting-jre-7 – Antoniossss Apr 14 '16 at 02:41

1 Answers1

0

you are mentioning OutOfMemoryError but you have not stated that MaxPermSpace is the cause inside the exception. Can it be that you are just running out of Heap Memory. In this case it should me -Xmx and -Xms parameters that should be set.

Usualy if it is the PermSpace it is mentioned as a cause inside the exception.

Alexander Petrov
  • 9,204
  • 31
  • 70