activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Gale <paul.n.g...@gmail.com>
Subject Re: Broker leaks FDs - Too many open files
Date Mon, 19 Aug 2013 21:20:37 GMT
On Mon, Aug 19, 2013 at 4:57 PM, Jerry Cwiklik <cwiklik@us.ibm.com> wrote:

> What are the consequences of using closeAsync="false"?



Setting async to false means that the socket close call is blocking and is
not handled in a separate thread.

This is preferable and common in web applications where STOMP clients, say,
will open a connection in the context of a web request, send a message,
then close the connection. Depending on the amount of web requests being
handled this translates into a lot of connect/disconnect traffic for the
broker.

It can take up to 30 seconds (on Linux systems, unless otherwise
configured) for a socket that's been 'closed' for its descriptor to be made
available for a new socket. If the close were made asynchronous then, as
you've seen, socket open requests are being made at a faster rate than
closed sockets can be recycled. Making the close operation synchronous
forces the client to block until it completes, thus controlling the number
of open requests keeping the descriptor count manageable.

What OS are you running your broker on? Please give more detail about your
clients, e.g., are they STOMP based etc? If they're STOMP based you might
want to consider configuring the STOMP transport connector to managed over
NIO for greater efficiency.

Thanks,
Paul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message