• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Unable to create 3000 Server Socket objects on Windows

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am developing an application, where the requirement of the application is to create 3000 server socket objects and listen to the incoming data. When I try to create 3000 socket server objects in the program, I am encountering an IOException stating that the BUFFER LIMIT is attained.

The program which is generating the 3000 Server Socket objects is being developed on Windows.

Q 1) Is this a limitation which Windows imposes?

Q 2) If this is not an Operating System issue then how do I get around with this problem.

Relevant answers are appreciated.

thank you
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is kind of an unusual design. Normally you'd have a single ServerSocket, and then put a multi-threaded server behind it so that it can process multiple incoming requests. Can you tell us why so many server sockets are required? (What's more, since every ServerSocket runs on its own port, the clients need to know which port to connect to.)
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's an OS limitation. As Ulf says, this is not the way things are normally done. What are you trying to achieve with this design?
 
krishna teja
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The requirement of the application is to simulate n number of servers. In this case the application needs to assign a unique port to each SocketServer and listen on that port. But I am unable to create beyond 325 server sockets.

So, is this a limitation which OS imposes or can i increase the buffer size.

Please understand the situation. The application needs to simulate n number of servers and server the requests.


Thank you
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I already said, it's an OS limitation, unrelated to Java. You'd want to refer to Windows administation documents to learn how to raise this limit, if it's possible.

But if you're doing a simulation, then why use real ServerSockets? Do a simulation.
 
reply
    Bookmark Topic Watch Topic
  • New Topic