(Not a duplicate, i've searched everywhere) I am using Ubuntu server and Tomcat7 gave a PemGenError out of memory. Then i increased the memory in setenv.sh file using export CATALINA_OPTS="Xms2048M -Xmx2048M"
. Error disappeared for awhile. But now its appearing again.
Any solution to this?
You have increased the wrong memory pool. When tomcat is out of PermGen-memory increasing the heap won't help. Try -XX:MaxPermSize=128m
(default is 64m).
As an alternative think about migrating to Java 8 that does not have the PermGen at all. Instead there's metaspace that (in the default settings) would grow indefinitely as long as your machines memory allows.