activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Himsley <m...@mdsh.com>
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
^C

$ netstat -ant|grep CLOSE_WAIT
tcp        1      0 127.0.0.1:5672          127.0.0.1:39370
CLOSE_WAIT


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://10.161.158.43:51766" daemon
prio=10 tid=0x00007f2958006000 nid=0x2937 in Object.wait()
[0x00007f29805b3000]
   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(Object.java:502)
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:119)
        - locked <0x00000007d835fa10> (a java.lang.Object)
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)

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

-- 
Mark Himsley

Mime
View raw message