activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Himsley <>
Subject AMQP transport leaving CLOSE_WAIT connections hanging
Date Wed, 11 Feb 2015 16:08:33 GMT
Dear ActiveMQ Users,

I have a problem: if I connect and disconnect from an ActiveMQ 5.10.0
AMQP socket without sending any data then ActiveMQ will leave that
socket in the CLOSE_WAIT state.

This is very easily tested, from Linux for instance:

$ nc localhost 5672

$ netstat -ant|grep CLOSE_WAIT
tcp        1      0

This is a problem for me, because any monitoring or HA clustering which
test that ActiveMQ AMQP connection is available by just connecting to
the port will cause one of the limited (1000, by default) connections to
be consumed, for ever.

Looking at a stack dump, it is these threads which build up - one for
each connect/disconnect.

"ActiveMQ Connection Dispatcher: tcp://" daemon
prio=10 tid=0x00007f2958006000 nid=0x2937 in Object.wait()
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000007d835fa10> (a java.lang.Object)
        at java.lang.Object.wait(
        - locked <0x00000007d835fa10> (a java.lang.Object)

See the attached where I have connected/disconnected several times using
nc, as above.

Mark Himsley

View raw message