• Post Reply Bookmark Topic Watch Topic
  • New Topic

Maximum Number of Sockets  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the maximum number of sockets that can be accepted by
ServerSocket on Solaris ?
When I try to run server application on Window-NT, serversocket can accept upto 65 K client connections & maintain it.
But the same application on Solaris only allows 53 client socket connection.Then afterwards, it gives the error--- "too many files open". My server application which is to be run on Solaris requires to maintain atleast 50K sockets.
Is there any way around for this. Also is this limit is per process or per machine.
Help is eagarly awaited.
Regards,
Abhijeet

 
Pawel Veselov
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is UNIX, not Java thing.
Type 'ulimit -n' at your shell prompt to see how many
open file descriptors can you have at once. I bet you'll see '64' there. To enable you server app to open 50K connections, you should raise this limit (that can't be done from the shell)
To do this, you have to find where you got this restrictions up to small number of descriptors and change it (perhaps this is in some scripts in /etc). I don't know Solaris this well, may be you should ask this in Unix/Linux forum.

------------------
With best of best regards, Pawel S. Veselov ( aka Black Angel )
 
Edward Man
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has to be done at the kernel level. Ask your Unix systems administrator to do it. Solaris can be customised by changing parameters without recompiling the kernel most of the time. However, the machine may need to be rebooted.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!