You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Reid Morrison (JIRA)" <ji...@apache.org> on 2011/06/07 20:43:58 UTC

[jira] [Closed] (AMQ-3358) ActiveMQ JMXConnectorFactory is not calling close causing thousands of threads to be created

     [ https://issues.apache.org/jira/browse/AMQ-3358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reid Morrison closed AMQ-3358.
------------------------------

    Resolution: Not A Problem

Downgraded the Hyperic HQ Agent from 4.5.1 to 4.4.0, which stops the threads from being created. Clearly a regression with the Hyperic HQ release.

Tried setting -Djmx.remote.x.server.connection.timeout=30000 but the JVM did not close the unused connections/threads.

> ActiveMQ JMXConnectorFactory is not calling close causing thousands of threads to be created
> --------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3358
>                 URL: https://issues.apache.org/jira/browse/AMQ-3358
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMX
>    Affects Versions: 5.5.0
>         Environment: Occurs on RHEL 5 and Mac OS
>            Reporter: Reid Morrison
>            Assignee: Dejan Bosanac
>
> We have run into a problem in production where our ActiveMQ 5.5 Broker eventually uses thousands of threads. Doing a thread stack dump we have thousands of the following entries:
> "JMX server connection timeout 127937" daemon prio=10 tid=0x000000001c215000 nid=0x1734 in Object.wait() [0x00002aabd7c97000]
>    java.lang.Thread.State: TIMED_WAITING (on object monitor)
>         at java.lang.Object.wait(Native Method)
>         at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:150)
>         - locked <0x00002b74ffe91938> (a [I)
>         at java.lang.Thread.run(Thread.java:619)
> We are using Hyperic HQ to monitor ActiveMQ remotely over JMX.
> To reproduce the problem in a stand-alone environment (without needing Hyperic) :
> 1. Start ActiveMQ 5.5 Broker
> 2. Connect to ActiveMQ using JConsole and then disconnect
> 3. Force a thread dump on the ActiveMQ broker process as follows:
>    kill -QUIT <activemq-pid>
> 4. After every JConsole connection to the Broker process the following additional thread is created:
> "JMX server connection timeout 128" daemon prio=5 tid=1030bd000 nid=0x1108f8000 in Object.wait() [1108f7000]
> Under ActiveMQ 5.4.2-Fuse-03-09 we do not see this issue. Is there an existing patch somewhere that has just not been applied to 5.5?
> Someone else with the same issue:
> http://web.archiveorange.com/archive/v/hXOgqMGA78WNhT5lpmKX
> We found more info on closing the JMX connection:
> http://forums.oracle.com/forums/thread.jspa?threadID=1665966&tstart=0
> We are willing to make and submit a patch with a little guidance on where we should call the close() on JMXConnectorFactory.
> It appears the source file where the change should be made is:
> activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
> Any help is appreciated.
> Thank you,
> Reid

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