Archived

This topic is now archived and is closed to further replies.

OS limits on incoming socket connections

This topic is 5812 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings all! I''ve recently become interested in the idea of writing some kind of multiplayer persistant world game, so I bought WordWare''s book on multiplayer game programming. One of the authors mentioned in passing that different operating systems have internal limits on how many sockets a server can be listening on at once. He went further to say that for some operating systems, this number may be as low as 5 or 6. Obviously, if I wanted to use streaming sockets, I''d run out of sockets fast on the server side. How do you guys get around this? Is this only a winsock thing? Why are these arbitrary software limits imposed on us? Does DPlay have similar limits? My current thinking to get around this problem is just to use UDP and send all the packets to the same server socket and let the server program sort it all out. I only have access to win98 and 2000 machines for use as potential game servers, so while Unix may in most cases be the answer, it isn''t here. Thanks for any input

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I never heard such a thing (although that hardly means it isn''t true). What OSes did the author say had such a limitation?
I''ve had 50+ sockets open on Win98 before (no, I didn''t make anything good, I was just playing around) with no problems.

Share this post


Link to post
Share on other sites
As I understand it, MS operating systems have a limitation by thread, although I''m not sure of the exact limit. I think I remember reading that it was around 64 per thread, but I may be wrong.

One thing you may want to look into for Win2000 is IOCP. I *think* it stands for I/O completion ports, but as usual it''s a guess from terrible partial memory.

Share this post


Link to post
Share on other sites
IIRC Windows 98 will only allow you to have 10 listening sockets at one time. This applies to incoming socket connections only... Each listening socket may accept (and keep open) some larger number of sockets (I think under Windows 98, the system can''t have more than 1024 or so total sockets open at a time).

I believe Windows 2000 Pro (and NT Workstation) have similiar restrictions. Windows 2000 Server has no built-in restrictions.

And yes, the restrictions are arbitrary so that you''ll go buy the Server versions of NT/2000/XP if you want to host many server/daemon type programs on one system.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Windows 2000 Pro has a limitation of 10 active connections. That is limited by the OS itself and can''t be increased. Perhaps hacked?

Windows 2000 Server has a setting that limits the number of connections, but can be increased. They have an honor system for the number of connections. Basically, you are suppose to purchase connection licenses to the operating system, but you can really just go into the control panel and increase the number of users. You aren''t suppose to do this beyond your license agreement.

I have had people set-up IIS web servers on Windows 2000 Pro and run into the 10 user limitation.

I never heard of limitations on Win98. I''m pretty sure WinXP has some type of limitation. If you choose XP, definitely use XP Pro in the least. XP home has a lot of networking limitations.

Share this post


Link to post
Share on other sites
The 10 user limit is for logging into a computer as a user. It has nothing to do with how many sockets or connections can be made at once.

People keep saying there''s a limit for like a web-server yet fail to offer relavent documentation and I''ve never found any to support such a claim yet. My web-server is doing just fine with hundreds of unique IPs connecting every day and thousands of pages being served up.

Ben


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I had asked this question at another Windows forum, and apparently, there IS a 10-connection limit on Win 9x/NT Workstation. This limit is on the number of INBOUND socket connections from UNIQUE IP Addresses. Note that it means that no more than 10 unique ip addresses may be simultaniously connected to a computer. However, I''ve never seen experimental evidence to back this up. If someone can verify this experimentally, I would be grateful.

Again, its not the number of sockets open. For example you could have 100 sockets open, but if they all connect to a single IP address, then its just one connection out of the 10 available.

As I said, I don''t know if anyone has verified this experimentally. But if its true, I would think that someone would have found a way to hack it.

Share this post


Link to post
Share on other sites
The limit probably isn''t based on a hard number, I imagine there is a limit but it''s probably a high one, 65536 or something like that. You''re more limited by the system resources. Every open socket takes up physical memory.

BTW, the 10 (or what ever you enter durring setup) USER limit is only for users logged into a windows NT/2000 domain. It''s not a limit on TCP/UDP connections to the server.

Share this post


Link to post
Share on other sites
The Winsock Programmer''s FAQ recently updated its information on the maximum number of sockets on some Windows OS''s: http://tangentsoft.net/wskfaq/advanced.html#maxsockets

Share this post


Link to post
Share on other sites
Well, where I work we have several server products and according to experience, we can handle up to 3000 open sockets in Win NT.

As for memory.
We have a CVS server running on win NT (or win 2000) and when a person starts pulling downloads at a no delay rate (meaning he makes loads of connections) the VM memory goes up to about 500 mb.

Any good machine should be able to do more than 100 connections

Share this post


Link to post
Share on other sites
If there was a 10 connection limit, think about these online gameservers (Q3, HL), Heck, I''ve seen up to 64ppl on some tribes2 servers. The 10 connection limit they speak of applies to telnet, terminal services and I think their FIle/Printer sharing thing.

One problem with the programmer''''s mentality is insecurity. This goes deep. An insulting college litany says that failed mathematicians become computer programmers. They are also ridiculed for being nerdy losers, for being too fat or too skinny, and for having few social skills. Most programmers can be spotted easily in a crowd. Nobody really wants to hang out with them. Put thousands of these people in one company and if you can get them to work, you become a billionaire. -John C. Dvorak

Share this post


Link to post
Share on other sites