Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the exactly same problem as here: Windows XP TCP/IP No buffer space available

On Windows XP Pro, SP3 if one does an experiment where one tries to open TCP/IP sockets in a loop (bascially, listen port 7000, listen port 7001, etc.)

After approx 649 open sockets, one will start getting errors: No buffer space available (maximum connections reached?)

I've tried to edit the registry as described here http://smallvoid.com/article/winnt-tcpip-max-limit.html I set MaxUserPort = 65534 and MaxFreeTcbs = 2000, but it didn't help.

What else can I do? I need 1000 server sockets.

Here is the error stack:

05.04.2012 10:23:57 java.net.SocketException: No buffer space available (maximum connections reached?): listen at sun.nio.ch.ServerSocketChannelImpl.listen(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:127) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52) at channelserver.NIOAppServer.initSelector(NIOAppServer.java:40) at channelserver.NIOAppServer.(NIOAppServer.java:27) at channelserver.NIOServer.main(NIOServer.java:433) at channelserver.NIOServer.main(NIOServer.java:438)

share|improve this question
    
Googling for the error, everything seems to refer to Java/JDBC. Is this a Java app you're writing? If so you may get a better response over at Stackoverflow. –  Chris McKeown Apr 5 '12 at 7:34
    
Yes, this is Java application, but there is nothing about jdbc in error stack. Anyway, thanks for you help, I'll try to ask there –  Natalia Apr 5 '12 at 8:00
    
Check this out too: stackoverflow.com/questions/6068423/… –  Chris McKeown Apr 5 '12 at 8:20
    
I've seen this, but found nothing suitable. –  Natalia Apr 5 '12 at 8:30
add comment

1 Answer

up vote 0 down vote accepted

Just in case someone would face this problem too.
Finally it seemed to me that it's just WinXP's problem. I've tried the same code with more RAM - results were the same. But when I've tried it on Win7, everything worked fine even with 1200 sockets.
So, WinXP is just not suitable for such tasks.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.