3 Replies Latest reply on Aug 12, 2010 3:05 PM by Ron Sigal

    Remoting - "replacing control socket"  Question

    vidhya Baskaran Newbie

      We have a JBOSS server ( messaging - 1.4.6. GA and remoting is from the 5.0.0 GA version) used exclusively for messaging purposes, and the last few weeks ,we see this in the remoting logs -

       

      DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker,] (secondaryServerSocketThread[0]) SocketClientInvoker[1acf0ed, bisocket://x.x.x.x:1805340362] replacing control socket: Socket[addr=/x.x.x.x,port=1311,localport=36953]

       

       

      and everytime this happens(its for multiple clients connected to the server), the remoting CurrentClientPoolSize keeps increasing and they never seem to go back to the pool.....

       

      and this happens right on the hr or 30 mins past hr ( like 1 pm , 1.30 pm, 3 , 4, 9.... this varies...)

       

      Does this have anything whatsoever to do with some configurations on the server or is this more on the network (like congestion, scans....something else ?? )

       

      Any help is appreciated..

        • 1. Re: Remoting - "replacing control socket"  Question
          Ron Sigal Master

          Hi Vidhya,

           

          A control socket is replaced if the client is listening for a ping from the server and the ping does not arrive.  Originally, JBossMessaging had turned off the pinging, but there has been some confusion lately.  I would suggest going to $JBOSS_HOME/server/$CONFIG/deploy/messaging/remoting-bisocket-service.xml and adding the lines

           

             <attribute name="pingFrequency" isParam="true">214748364</attribute>
             <attribute name="pingWindowFactor" isParam="true">10</attribute>

           

          which will turn off pinging.

           

          -Ron

          • 2. Re: Remoting - "replacing control socket"  Question
            vidhya Baskaran Newbie

            Thanks Ron for the reply.

            I did fix the issue.We had a job that ran every 30 minutes to sync the Messaging server time. I turned it off and the 'replacing control socket' disappeared and the thread count is stable.

             

            But back to the case where the control sockets gets replaced becuase the client didn't receive a ping back from the server (assuming when the time sync happened , the time was off and hence something happened to the server ping threads....), shouldn't these remoting threads be cleaned up on the server since the client is not using these threads anymore and have started using the new ones ? In my case the currentPoolSize never decreased.

             

            Also does turning the ping off have any effect on the messaging (i will post it in the messaging forums...just wanted to see if you have any thoughts on it.)

             

             

             

            Thanks a lot.

            • 3. Re: Remoting - "replacing control socket"  Question
              Ron Sigal Master

              H Vidhya,

               

              vidhya Baskaran wrote:

               

              shouldn't these remoting threads be cleaned up on the server since the client is not using these threads anymore and have started using the new ones ? In my case the currentPoolSize never decreased.

               

               

              Not necessarily.  currentPoolSize represents the number of threads currently either (1) actively executing an invocation, or (2) sitting in a read() waiting for the next invocation.  The latter threads will remain in that state until the read() times out, which, for JBossMessaging, is never, since remoting-bisocket-service.xml sets the "timeout" value to 0.  (Note, by the way, that the read() will be interrupted and the thread made available for reuse if the maximum number of threads is reached.)  Changing the control socket doesn't have any effect on this behavior.  If you're concerned about the number of threads, there is an "idleTimeout" parameter which, if set to a value greater than 0, will shut down threads that haven't been used for "idleTimeout" seconds.  Or, you could set "timeout" to a finite value.

               

              vidhya Baskaran wrote:

               

              Also does turning the ping off have any effect on the messaging (i will post it in the messaging forums...just wanted to see if you have any thoughts on it.)

               

               

              Well, it used to be that JBossMessaging always turned off the ping, but I believe (and I think they now believe) that doing so can lead to problems.  The trick is to find the right ping interval to avoid too many spurious timeouts due to busy servers or congested networks.

               

              -Ron