2 Replies Latest reply: Nov 9, 2010 6:55 PM by cjohnson22 RSS

    How to determine hung connections

      I have been using imq for several years successfully, but always run into this same problem. When a topic is backlogged, it usually is because the client on one of the connections is hung up. I cannot easily tell which of the clients needs to be manually killed/disconnected from the service. I have ways to deal with this, but none of them are ideal or error proof. Is there a way to access this info? imqcmd does not appear to have any connection statistics. You cannot even determine what destination a connection is consuming from, as far as I can tell.

      Any help would be greatly appreciated!

        • 1. Re: How to determine hung connections
          Nigel Deakin-Oracle
          The broker periodically tests connections are still alive and if they don't respond after imq.ping.interval seconds (default 120 secs) then the broker will close the connection.

          If you need more information than is available using imqcmd then I would suggest using the JMX API. This allows you to list the connections on a broker, list the consumers on each connection (including what destination they are consuming on), list the consumers on a particular destination, and destroy a particular connection. The API is pretty simple to use and is fully described in the Developer Guide for JMX Clients (http://docs.sun.com/app/docs/doc/821-1797) .

          • 2. Re: How to determine hung connections
            The connections are not timing out, since some have queued up 30k messages over a week or so. Not sure what is happening to the clients, but it is most likely a bug somewhere in our code.

            Thanks for the info, I will have to check out the JMX API as I have never used that before.