What does "tcp connections on client machine are cleared" mean? TCP connections need to be closed properly to avoid leaving the other side in a bad state, so if it means "I kill -9'ed the client processes" or something else that would result in an improper closing of the connection, then fix that and see if your leak goes away.
Also, there are options to use ActiveMQ's built-in keep-alive features to detect broken TCP connections; see http://activemq.apache.org/tcp-transport-reference.html. But first try to avoid breaking the connections in the first place. On Jun 8, 2015 2:03 PM, "sssig23" <sssi...@gmail.com> wrote: > Hello, > > We are using ActiveMQ to deliver JMS messages in a distributed peer > environment and there seem to be TCP connections leak issue happening on > the > server machine > > Here are some details, but sorry if I am missing posting something here > > netstat output on server machine - > > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:59726 > ESTABLISHED > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:59035 > ESTABLISHED > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:58414 > ESTABLISHED > > netstat output on client machine - > > tcp 0 0 ::ffff:10.40.205.111:59726 ::ffff:10.5.69.95:8501 > ESTABLISHED > tcp 0 0 ::ffff:10.40.205.111:59035 ::ffff:10.5.69.95:8501 > ESTABLISHED > tcp 0 0 ::ffff:10.40.205.111:58414 ::ffff:10.5.69.95:8501 > ESTABLISHED > > After some time, tcp connections on client machine are cleared > > tcp 0 0 ::ffff:10.40.205.111:59726 ::ffff:10.5.69.95:8501 > ESTABLISHED > > But tcp connnections on server machine remain > > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:59726 > ESTABLISHED > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:59035 > ESTABLISHED > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:58414 > ESTABLISHED > > And this behavior continues and on server machine keep TCP connections keep > growing whereas the client machine do not > > After about 1 hour on server machine - > > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:59726 > ESTABLISHED > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:59035 > ESTABLISHED > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:58414 > ESTABLISHED > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:61280 > ESTABLISHED > tcp 0 0 ::ffff:10.5.69.95:8501 ::ffff:10.40.205.111:64875 > ESTABLISHED > > Rate of this tcp growth is variable and takes few days to reach hundreds of > TCP connections and a week or two it gets into thousands before it reaches > ulimit on file system and requires a restart of the application > > Using transport.soTimeout=60000 does not seem to be very useful, could this > be a firewall related issue or any TCP tuning parameters that can resolve > the issue? > > Thank you for any feedback > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/TCP-connections-leak-tp4697435.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >