IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Socket connections piling up

  • 1.  Socket connections piling up

    Posted Wed August 24, 2005 04:38 PM

    We have a C socket client, who initiates the socket request. They close the socket connection after use. (They open multiple connections within a socket.

    We have a java socket server (wM), who accepts the connections and send data through an OutputStream. We never close the OutStream and the Socket server.

    Problem: When they open new connections, they sometimes get timeout, since server on our side cannot accept connections since there are threads already hanging from previous connections.

    It’s a windows box on the server side. How can we dynamically kill the connection threads st the server. Or any other better solutions?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Socket connections piling up

    Posted Wed August 24, 2005 07:02 PM

    Hello,
    When the client makes the first connection, does it just use that for all connections there after? If so, I would suggest you make a solution that the server has a main port to listen on, and when the client does the first connect, the server gives a new quick port to connect to for further interaction. That way, your main two or three ports are open and you can have thousands of dynamic subconnections to work with. You can also have a thread manager on the server, where if ping() command doesn’t show an update after a certain time, you can just call the Thread.stop() method to rip down the thread. That would cause the port to be locked for a long while, but you gain room for memory and processing. Good day.

    Yemi Bedu


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods