• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble making more than 244 simultaneous connections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble making more than 244 simultaneous connections


  • Subject: Re: Trouble making more than 244 simultaneous connections
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 26 Nov 2008 07:33:05 -0800


On Nov 26, 2008, at 1:02 AM, Brian Williams wrote:

Hi,

I am writing a server for a multiplayer iPhone game. Everything is working just great, except that the server craps out at about 220-240 connections.

setrlimit will get you past 240, but at some point in the low thousands you are likely to run into the kernel's hardwired limit on the total number of open sockets. On Linux or BSD people then get around this by upping the limit value in the source code and recompiling the kernel; not a practical option on OS X (unless you want to go all-Darwin.) On the other hand, OS X might have gotten rid of the hardwired socket limit inherited from the BSD networking code.


The next limit is at about 55,000 connections, since every socket uses up a TCP port number; those have a 16-bit namespace and values < 1000 are reserved. I've read of workarounds for this, but they involve using multihoming to create large numbers of additional IP addresses for the server, to multiply the namespace. I read recently that one of the last.fm guys had managed to build a server [in Erlang, on Linux] that handled a million simultaneous connections, but I can't find the link now...

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Trouble making more than 244 simultaneous connections
      • From: "Hamish Allan" <email@hidden>
References: 
 >Trouble making more than 244 simultaneous connections (From: Brian Williams <email@hidden>)

  • Prev by Date: Re: Cocoa datatype SOAP encoding
  • Next by Date: Re: Trouble making more than 244 simultaneous connections
  • Previous by thread: Re: Trouble making more than 244 simultaneous connections
  • Next by thread: Re: Trouble making more than 244 simultaneous connections
  • Index(es):
    • Date
    • Thread