You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by slippytoad <na...@sidestep.com> on 2007/08/29 17:03:29 UTC

Asynchronous producer causing many hanging threads

We have a high-volume Tomcat app that posts a message to an ActiveMQ 5.0
queue asynchronously.  We are using tcp:failover and when we're done we're
closing the session, connection, producer in that order.  Eventually the JVM
eats up all resources by creating hundereds of ActiveMQ Scheduler threads
and ActiveMQ Transport threads.  The issue happens whether we close
everything or not.

We do see a lot of Exceptions in the log:

org.apache.activemq.transport.failover.FailoverTransport Transport failed,
attempting to automatically reconnect due to: java.io.EOFException
java.io.EOFException
        at java.io.DataInputStream.readInt(DataInputStream.java:358)
        at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
        at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
        at java.lang.Thread.run(Thread.java:595)

and

org.apache.activemq.transport.failover.FailoverTransport Transport failed,
attempting to automatically reconnect due to: java.net.SocketException:
Socket closed
java.net.SocketException: Socket closed
        at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at
org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:109)
        at java.io.DataOutputStream.flush(DataOutputStream.java:106)
        at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:119)

and then tons of threads like this:

- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[],
int,
int, int) @bci=0 (Compiled frame; information may be\
 imprecise)
 - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129
(Compiled frame)
 - org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill() @bci=31,
line=49 (Compiled frame)
 - java.io.DataInputStream.readInt() @bci=4, line=353 (Compiled frame)
 - org.apache.activemq.openwire.OpenWireFormat.unmarshal(java.io.DataInput)
@bci=10, line=267 (Compiled frame)
 - org.apache.activemq.transport.tcp.TcpTransport.readCommand() @bci=8,
line=156 (Compiled frame)
 - java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)

Anyone got any clues?  Many thanks.
-- 
View this message in context: http://www.nabble.com/Asynchronous-producer-causing-many-hanging-threads-tf4348312s2354.html#a12388934
Sent from the ActiveMQ - User mailing list archive at Nabble.com.