4 Replies Latest reply on Jan 9, 2008 10:51 AM by César Mateus

    CLOSE_WAIT and socket.close() issue

    Todd Goepferd Newbie


      JBoss_4_0_4_GA date=200605151000
      Red Hat Linux 2.6.9-42.ELsmp (i386)
      JVM Version: 1.5.0_07-b03 (Sun Microsystems Inc.)

      I have a servlet which receives a query and then needs to make a web services query to an external host. Once that host completes processing my query, it calls my web service with the result.

      I am having 2 issues when I a client of the external host and I am using the JBoss web services libraries:

      1)Overtime, the number of TCP connections in the CLOSE_WAIT state rises until around 1000 and then the processing begins to fail. With the axis library, it has been known for a few years that this issue occurs and the solution in axis has been to call socket.close(). Is there a way to instruct the jboss libraries to close the connection after each call? Or, is there some work around that others have found?

      2) At the TCP level, there are times when the initial 3-way handshake takes many seconds because the ACK from the remote host is not received. After about 3 seconds, the SYN is resent. That is much too long for my application. According to Red Hat support, there is not an OS setting that will change that. They say it has to be done within the application. Therefore, it would have to be a change to the jboss libraries that control teh socket connection. Is there a JBoss configuration parameter to change it? Is there any other work around?

      I know there is a lot of expertise on this forum, so any help would be greatly appreciated.

      Todd Goepferd