Note that there are some explanatory texts on larger screens.

plurals
  1. POHanging ActiveMQ Transport and Connection threads
    text
    copied!<p>I've got a Webservice deployed on Apache ServiceMix which uses Apache Camel to invoke an ActiveMQ driven route using code similar to the following:</p> <pre><code> context.createProducerTemplate().sendBody("activemq:startComplex", xml); </code></pre> <p>The invocation works fine but after some time the file descriptor limit on my Linux machine gets hit. The resources are eaten up by a whole bunch (a few thousand) of ActiveMQ threads. Under the jmx console I can see a lot of threads similar to the following:</p> <pre><code>Name: ActiveMQ Transport: tcp://localhost/127.0.0.1:61616 State: RUNNABLE Total blocked: 0 Total waited: 0 Stack trace: java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.read(SocketInputStream.java:129) org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:5 0) org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:589) org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:5 8) org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:574) java.io.DataInputStream.readInt(DataInputStream.java:370) org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275) org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:222) org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214) org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:197) java.lang.Thread.run(Thread.java:662) </code></pre> <p>and</p> <pre><code>Name: ActiveMQ Transport: tcp:///127.0.0.1:46420 State: RUNNABLE Total blocked: 0 Total waited: 2 Stack trace: java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.read(SocketInputStream.java:129) org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50) org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:589) org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58) org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:574) java.io.DataInputStream.readInt(DataInputStream.java:370) org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275) org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:222) org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214) org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:197) java.lang.Thread.run(Thread.java:662) </code></pre> <p>And ideas how to get rid of the hanging threads?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload