Page 1 of 1

Memory leak while running demosite on tomcat

Posted: Thu Aug 29, 2013 4:26 pm
by sunnyadak
Has anyone seen this error while running demosite 3.0.0-GA, its a consistent error.

Aug 29, 2013 1:14:08 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/swp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1ac3d0c]) and a value of type [org.broadleafcommerce.common.web.BroadleafRequestContext] (value [org.broadleafcommerce.common.web.BroadleafRequestContext@1273929]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

I am seeing this in Tomcat 6, Java 1.6 and SQL Server 2010/ My Sql

Thanks,

Re: Memory leak while running demosite on tomcat

Posted: Wed Nov 13, 2013 8:38 am
by Theo Schumacher
Hi,

i have had the same problem with Tomcat7/mysql stack. Inspecting the stack trace showed that it is related to java heap space. I could solve the problem by adding the following

CATALINA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC"

added in

/usr/share/tomcat7/bin/catalina.sh

regards