Re: Trouble making more than 244 simultaneous connections
Re: Trouble making more than 244 simultaneous connections
- Subject: Re: Trouble making more than 244 simultaneous connections
- From: Eli Bach <email@hidden>
- Date: Wed, 26 Nov 2008 01:58:03 -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. Currently the server is written in cocoa and
based on the tcpServer example code that apple provides. I have also
tried running a test with the smallsockets code, with the same
results. If the test is run locally it's fine, but when I try to
connect to the remote server it wont scale. The server is a new
intel mac mini colocated and a decent hosting company. I have also
tried having two machines on different networks run the test at the
same time, and each only makes it to 120, so about the same number
of connections.
You can see the test code that I have here:
http://chromaticgray.com/TestApp.zip
Thanks for any advice you might have.
Could this be related to the maximum number of open file descriptors a
process can open at one time? On my system, ulimit -n reports a
process can only open 256 file descriptors.
There may be an environment variable that increases this limit, but I
can't think of it offhand (or the 'ulimit' cli tool may be able to
increase it).
Or you may have to go with a multi-process solution for your server,
where each process handles a limited number of connections.
There is also the 'NumberOfFiles' key for launchd daemon's.
But I am also be totally off-base...
Eli
_______________________________________________
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