activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Tran (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (AMQ-2852) Memory leak when undeploying webapp with ActiveMQ client
Date Sun, 24 Jul 2011 21:48:12 GMT

    [ https://issues.apache.org/jira/browse/AMQ-2852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070257#comment-13070257
] 

Dan Tran edited comment on AMQ-2852 at 7/24/11 9:47 PM:
--------------------------------------------------------

I am using AMQ 5.5 using embedded mode with no persistent listening for external producer
connectors and consumed via VM connector. Still see the issue

SEVERE: The web application [/mc] appears to have started a thread named [ActiveMQ Task-20]
but has failed to stop it. This is very likely to create a memory leak.

Any suggestion?

      was (Author: danttran):
    I am using AMQ 5.5 using embedded mode listening for external producer connectors and
consumed via VM connector. Still see the issue

SEVERE: The web application [/mc] appears to have started a thread named [ActiveMQ Task-20]
but has failed to stop it. This is very likely to create a memory leak.

Any suggestion?
  
> Memory leak when undeploying webapp with ActiveMQ client
> --------------------------------------------------------
>
>                 Key: AMQ-2852
>                 URL: https://issues.apache.org/jira/browse/AMQ-2852
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.2
>            Reporter: Daniel Spilker
>            Assignee: Gary Tully
>             Fix For: 5.5.0
>
>
> I have a web app with an ActiveMQ client. When undeploying the app, Tomcat logs the following
messages.
> {code}
> 28.07.2010 17:44:28 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
> SCHWERWIEGEND: The web application [] appears to have started a thread named [InactivityMonitor
Async Task: java.util.concurrent.ThreadPoolExecutor$Worker@c821ef] but has failed to stop
it. This is very likely to create a memory leak. 
> 28.07.2010 17:44:28 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
> SCHWERWIEGEND: The web application [] appears to have started a thread named [TcpSocketClose:
java.util.concurrent.ThreadPoolExecutor$Worker@19ac2e3] but has failed to stop it. This is
very likely to create a memory leak. 
> {code}
> Searching for "InactivityMonitor Async Task" and "TcpSocketClose", I found org.apache.activemq.transport.tcp.TcpTransport
and org.apache.activemq.transport.InactivityMonitor which both start a ThreadPoolExecutor
in their static intializers but never stop them. The ThreadPoolExecutors hold references to
ActiveMQ classes which hold a reference to the webapp classloader. These references prevent
the webapp classes from being unloaded when the webapp is undeployed. Due to this the servlet
container runs out of memory after a few redeployments.
> The ActiveMQ client should dispose all resources when being closed, including the ThreadPoolExecutors.
Or to provide some methods to explicitly stop these Threads (like org.apache.activemq.thread.Scheduler.shutdown()
does).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message