TCP/IP socket reading trouble - help- please

Discussion in 'Java' started by daniel.shaya@tamesis.com, Jun 30, 2005.

  1. Guest

    I have a distributed java (jdk1.4) system running on a Windows 2003
    enterprise server (4 cpu 8GB RAM).

    There are about 17 servers communicating through JMS (using SWIFT) and
    direct socket connections.

    After a while servers begin to throw the following exception.

    java.net.SocketException: No buffer space available (maximum
    connections reached?): recv failed
    at java.net.SocketInputStream.socketRead0 (Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
    at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
    at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
    at sun.nio.cs.StreamDecoder.read0 (StreamDecoder.java:131)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:117)
    at java.io.InputStreamReader.read(InputStreamReader.java:151)

    Any help at all greatly appreciated.

    Daniel
    , Jun 30, 2005
    #1
    1. Advertising

  2. Guest

    escreveu:
    > I have a distributed java (jdk1.4) system running on a Windows 2003
    > enterprise server (4 cpu 8GB RAM).
    >
    > There are about 17 servers communicating through JMS (using SWIFT) and
    > direct socket connections.
    >
    > After a while servers begin to throw the following exception.
    >
    > java.net.SocketException: No buffer space available (maximum
    > connections reached?): recv failed


    Did you do what I recommended last week or so? There can be issues with
    socket cleanup and Java, and while you may only have a few sockets
    running, it can snowball. Since JMS is implemented per vendor, hard to
    say. Showing from a TCP point of view what is happening could explain
    alot - or eliminate some possibilities.

    In short, run netstat and post your filtered results.

    HTH,
    iksrazal
    http://www.braziloutsource.com/
    , Jun 30, 2005
    #2
    1. Advertising

  3. Guest

    Yes I tried this.

    We are definitely not running out of sockets.

    I'm afraid it's something else.
    , Jun 30, 2005
    #3
  4. Guest

    escreveu:
    > Yes I tried this.
    >
    > We are definitely not running out of sockets.
    >
    > I'm afraid it's something else.


    There is a difference between having say 15 sockets open but not
    closing them properly and ending up with a 1000. Anyways, still seems
    like a resource issue - that is always the case with this exception.
    You could try using a bigger bucket at the OS level. In Windows there
    is a "MaxConnections" registry key. Note this just makes the bucket
    bigger and may just overflow again. I'm afraid you'll have to do some
    testing at the OS level to understand just what resource Java seems to
    be lacking. Something should be obvious.

    HTH,
    iksrazal
    http://www.braziloutsource.com/
    , Jun 30, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. antoine
    Replies:
    3
    Views:
    4,793
    antoine
    Dec 7, 2005
  2. KK
    Replies:
    2
    Views:
    498
    Big Brian
    Oct 14, 2003
  3. Tiger
    Replies:
    5
    Views:
    947
    Dave Thompson
    May 1, 2006
  4. Laszlo Nagy
    Replies:
    1
    Views:
    4,736
    Mark Wooding
    Jan 27, 2009
  5. Jean-Paul Calderone
    Replies:
    0
    Views:
    936
    Jean-Paul Calderone
    Jan 27, 2009
Loading...

Share This Page