TCP/IP socket reading trouble - help- please

D

daniel.shaya

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
 
I

iksrazal

(e-mail address removed) 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/
 
D

daniel.shaya

Yes I tried this.

We are definitely not running out of sockets.

I'm afraid it's something else.
 
I

iksrazal

(e-mail address removed) 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/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top