0

Deploying multiple times gives me the permgen out of memory problem. The classloader that i think giving this problem is TomcatInstrumentableClassLoader used by spring for load time weaving.

Has anyone else faced this issue with this classloader holding on to classes and not telling the garbage collector to do its job?

Is there anything i can do to avoid this problem?

Warz
  • 7,386
  • 14
  • 68
  • 120
  • What are you tomcat memory settings? Which version of Tomcat? How are you deploying? I have to restart Tomcat all the time because of this. – chrislovecnm Aug 21 '12 at 00:12
  • tomcat 7, i have my eclipse environment pointing to my tomcat installation with the memory settings from catalina.sh set to export JAVA_OPTS="-Xms1024m -Xmx10246m -XX:NewSize=256m -XX:MaxNewSize=356m -XX:PermSize=256m -XX:MaxPermSize=356m" – Warz Aug 21 '12 at 00:16
  • about the same that I am using: JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -server -Xms2g -Xmx2g -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCompressedOops -Xss1024K -XX:NewSize=512m -XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=80" What type of deployments are you doing? – chrislovecnm Aug 21 '12 at 01:04
  • I am still in development so i deploy frequently with tomcat with just any changes. How can i know if these changes are taking effect. I have an eclipse tomcat instance configured with my tomcat directory being pointed to? i will try your settings instead – Warz Aug 21 '12 at 01:13
  • 1
    http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error – chrislovecnm Aug 21 '12 at 01:25
  • Thanks man, im gonna add the one argument that doesnt cause performance issues and give it a try. Unfortunately it doesn't happen on every redeploy but every 4-5 times. – Warz Aug 21 '12 at 01:38

0 Answers0