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?