Re: Maximum number of sockets
Re: Maximum number of sockets
- Subject: Re: Maximum number of sockets
- From: Eric Arlotti <email@hidden>
- Date: Fri, 18 Jun 2004 19:02:58 +0200
Unfortunately, I don't know what's inside this library.
What I do is increasing the max file descriptors up to twice the number
of sockets that I want to create (I know this is too much but it's for
debug purpose). It works well for 500 or 600 sockets, but problems
occur around 1000 (1024 ?) sockets, although the max file descriptors
is successfully set to the expected value ( I can see it in Terminal
with "fstat").
Eric
Le 18 juin 04, ` 16:28, Allan Nathanson a icrit :
Does the third-party library issue a select(2) call?
Is the library prepared to use/create/deal-with fd_set's with more
than 256 bits worth of file descriptors?
- Allan
On Jun 18, 2004, at 9:50 AM, Eric Arlotti wrote:
Fred,
Thanks a lot for the help.
I already use getrlimit/setrlimit to increase the maximum number of
file descriptors. It works well (I can see the number of files opened
with an fstat, it increases as I expect - and believe me, I have set
the limit well beyond what I really need).
It really seems that I'm facing another limit. The problem is that I
use a third-party library and that the listening function of this
library returns no error code but a null "reference" when it fails,
so I can't really determine the reason why it fails. I suspect that
it encounters a limitation because it only happens when I increase
the number of sockets.
Eric
Le 18 juin 04, ` 12:47, Frederick Cheung a icrit :
To: macnetworkprog Programming <email@hidden>
From: Eric Arlotti <email@hidden>
Subject: Maximum number of sockets
Date: Thu, 17 Jun 2004 15:08:11 +0200
Is there a limitation in the number of sockets (BSD or
OpenTransport)
that a Mac OS X application can open simultaneously ? sysctl says
kern.ipc.maxsockets=512 : is this the limit ? And is there a way to
increase this limit (OS X refuses to change kern.ipc.maxsockets) ?
Thanks.
Eric Arlotti
email@hidden
You should probably worry first about the maximum number of file
descriptors , 256 by default. You can set this limit with
getrlimit/setrlimit. I seem to recall testing my app in a scenario
that would have used more than 512 sockets, but I could be wrong.
Fred
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.