2 Replies Latest reply on Jun 24, 2004 3:49 PM by genman

    UIL2: How to tune it to stop client disconnected errors?

    mylesj

      We constantly get client disconnected exceptions when using messaging. We use the UIL2 connection layer on JBoss 3.2.1.

      When we run JBoss and the messaging client on the same machine we never get the error but when they run on different machines, after about an hour or two the clients get disconnected.

      The networks we run are terribly unresponsive and I believe that it is this that is causing the messaging to fail regularly.

      UIL2 has two settings PingPeriod and ReadTimeout which are set to 60000 and 70000 respectively. If I change PingPeriod to 69999 then I can recreate the client disconnected error when running the client and JBoss locally.

      What is the best way to tune the two settings to stop the client disconnected errors? Can they both be set to 0 such that no disconnection checks are performed at all? Should I increase the ReadTimeout value to a huge number whilst leaving PingPeriod on 60000?

      Help would be appreciated. Thanks,

      Stack trace follows:

      org.jboss.mq.SpyJMSException: Cannot send a message to the JMS server; - nested
      throwable: (java.io.IOException: Client is not connected)
      at org.jboss.mq.Connection.sendToServer(Connection.java:1251)
      at org.jboss.mq.SpySession.sendMessage(SpySession.java:699)
      at org.jboss.mq.SpyTopicPublisher.internalPublish(SpyTopicPublisher.java
      :120)
      at org.jboss.mq.SpyTopicPublisher.publish(SpyTopicPublisher.java:68)

      Myles

        • 1. Re: UIL2: How to tune it to stop client disconnected errors?
          mylesj

          An additional question: does the message listener thread, the one that invokes onMessage() also respond to server "keep alive" ping requests? The reason I ask is that I have a sneaking suspicion that if the thread that invokes onMessage() is tied up with processing lots of business logic then it is not in a position to respond to ping messages thereby making JBoss think that the client is not responding and then closing the connection.

          • 2. Re: UIL2: How to tune it to stop client disconnected errors?
            genman


            The onMessage processing happens in its own separate thread.

            It looks like pingPeriod set to zero disables it.

            ./src/main/org/jboss/mq/Connection.java

            1306 /**
            1307 * Start the ping thread
            1308 */
            1309 private void startPingThread()
            1310 {
            1311 // Ping thread does not need to be running if the ping period is 0.
            1312 if (pingPeriod == 0)
            1313 return;
            1314 pingTaskId = clockDaemon.executePeriodically(pingPeriod, new PingTask(), true);
            1315 }