I see (lines similar to) the following in my log, everytime, I shutdown TomEE. Am I concerned? Even though it says 'SEVERE', it also says, 'very likely to create a memory leak'. I don't see these threads any longer after I stop TomEE and I don't see these threads when I restart TomEE. I get brand new threads for ActiveMQ. I don't know how to monitor the JVM to see if the threads are running when TomEE/ActiveMQ is 'not' running. If you tell me how I can monitor JVM for these threads 'after' I shutdown TomEE/app, then I don't mind trying on my development server.
Still, this is not a concern of mine at all, because when my app is idle, it is using 200 to 250m of memory, and highest, I usually see is 500 or 600m, and my -Xms/-Xmx has been 1024m for last 1 or 2 months, and then Tomcat committers advised 5 x the minimum amount of memory it takes to run my app (bottom of the saw-tooth graph in jvisualvm), so i now have -Xms/-Xmx = 1250m. >From what I can tell, the threads are removed when the container (tomee/tomcat7) is stopped, but please feel free to correct me. why do you feel as though this is a concern 'after' you stop/shutdown your app? Do you see the threads still exist, after you stop/shutdown your app and when you restart your app? Apr 18, 2013 1:55:19 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webapp] appears to have started a thread named [PoolIdleReleaseTimer] but has failed to stop it. This is very likely to create a memory leak. Apr 18, 2013 1:55:19 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webapp] appears to have started a thread named [Default JMS Resource Adapter-worker-1] but has failed to stop it. This is very likely to create a memory leak. Apr 18, 2013 1:55:19 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webapp] appears to have started a thread named [Default JMS Resource Adapter-worker-2] but has failed to stop it. This is very likely to create a memory leak. Apr 18, 2013 1:55:19 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webapp] appears to have started a thread named [ActiveMQ BrokerService[localhost] Task-3] but has failed to stop it. This is very likely to create a memory leak. Apr 18, 2013 1:55:19 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webapp] appears to have started a thread named [Default JMS Resource Adapter-worker-3] but has failed to stop it. This is very likely to create a memory leak. Apr 18, 2013 1:55:19 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webapp] appears to have started a thread named [ActiveMQ VMTransport: vm://localhost#5-2] but has failed to stop it. This is very likely to create a memory leak. Apr 18, 2013 1:55:19 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webapp] appears to have started a thread named [ActiveMQ VMTransport: vm://localhost#5-3] but has failed to stop it. This is very likely to create a memory leak. Apr 18, 2013 1:55:19 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webapp] appears to have started a thread named [ActiveMQ VMTransport: vm://localhost#4-3] but has failed to stop it. This is very likely to create a memory leak. On Thu, Apr 18, 2013 at 1:39 PM, Leonardo Torres <[email protected]>wrote: > Thanks Howard, > > Unfortunately, I can´t stop the thread. Anyone have any suggestions? > > > On Tue, Apr 16, 2013 at 8:24 PM, Howard W. Smith, Jr. < > [email protected]> wrote: > > > About a month ago, I started using ActiveMQ (v5.8.0) that is bundled with > > TomEE (v1.6.0), and i noticed that in the log too, when I stopped TomEE > (to > > deploy new version of WAR file). > > > > so, I searched google, and found the following, > > > > > > > http://activemq.2283324.n4.nabble.com/Old-issue-Memory-leak-after-stop-web-application-in-Tomcat-td4653959.html > > > > which referenced the following, > > > > https://issues.apache.org/jira/browse/AMQ-3451 > > > > I found them both to be informative, and I think a fix was introduced in > > ActiveMQ 5.7.0, and the end result is that, even though your tomcat/tomee > > log mentions those possible memory leaks... if you examine your threads > > 'after' tomcat/tomee is stopped, then you will not see those threads any > > longer. > > > > At least, that is the case for me, since I'm using ActiveMQ 5.8.0 via > > TomEE+ 1.6.0. :) > > > > > > > > On Tue, Apr 16, 2013 at 5:22 PM, Leonardo Torres > > <[email protected]>wrote: > > > > > Hi guys, > > > > > > I´m using AMQ 5.7.0 with Spring 3.0.1 and tomcat 7.0.19 as servlet > > > container. So, when my application starts, it´s ok, but when the tomcat > > > stop, I see in the console the follow lines: > > > > > > > > > "SEVERE: The web application [] appears to have started a thread named > > > [ActiveMQ InactivityMonitor Worker] but has failed to stop it. This is > > very > > > likely to create a memory leak. > > > Apr 16, 2013 2:43:21 PM org.apache.catalina.loader.WebappClassLoader > > > clearReferencesThreads > > > SEVERE: The web application [] is still processing a request that has > yet > > > to finish. This is very likely to create a memory leak. You can > control " > > > > > > How can I stop these threads ? > > > > > > My jms-context.xml (Spring context) : > > > > > > <bean id="connectionFactory" > > > class="org.apache.activemq.ActiveMQConnectionFactory"> > > > <property name="brokerURL" value="tcp://x.x.x.x:61616?daemon=true"/> > > > </bean> > > > > > > <bean id="poolConnection" > > > class="org.apache.activemq.pool.PooledConnectionFactory"> > > > <property name="connectionFactory" ref="connectionFactory"/> > > > </bean> > > > > > > Thank´s in advance > > > -- > > > Obrigado > > > Leonardo Torres. > > > > > > > > > -- > Obrigado > Leonardo Torres. >
