Message4372

Author amak
Recipients amak, irmen
Date 2009-03-28.23:43:27
SpamBayes Score 8.9765795e-09
Marked as misclassified No
Message-id <1238283810.07.0.835172115006.issue1291@psf.upfronthosting.co.za>
In-reply-to
Content
This is alomost certainly a resource issue, on windows java.

I had a suspicion that this issue is nothing to do with threading, so I
rewrote the server to not spawn threads, but to process everything in a
single thread. The "single_threaded_server.java" file is attached.

I also modified the client to count the number of iterations it went
through (counting_client.py attached).

The exception occurs at (almost) exactly the same point each time, after
between 3945 and 3955 iterations on my Windows Server 2003 box, with the
following exception, which seems to indicate that buffer space has been
exhausted.

Exception: java.io.IOException: Unable to establish loopback connection
Exception in thread "main" java.io.IOException: Unable to establish
loopback connection
        at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:106)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122)
        at
sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)
        at java.nio.channels.Pipe.open(Pipe.java:133)
        at
sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:106)
        at
sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)
        at java.nio.channels.Selector.open(Selector.java:209)
        at single_threaded_server.main(single_threaded_server.java:69)
Caused by: java.net.SocketException: No buffer space available (maximum
connections reached?): connect
        at sun.nio.ch.Net.connect(Native Method)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
        at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
        at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78)
        ... 8 more
History
Date User Action Args
2009-03-28 23:43:30amaksetmessageid: <1238283810.07.0.835172115006.issue1291@psf.upfronthosting.co.za>
2009-03-28 23:43:30amaksetrecipients: + amak, irmen
2009-03-28 23:43:29amaklinkissue1291 messages
2009-03-28 23:43:28amakcreate