R10B3 crashes after >1014 tcp connections + Yaws

Claes Wikstrom klacke@REDACTED
Mon Jun 13 11:24:10 CEST 2005


joel reymont wrote:
> I took a quick look at the source code and there are quite a few
> places where FD_SETSIZE is hardcoded. So the number of open files
> fixed at 1024 on my Mac OSX 10.3.9. I could certainly edit the system
> header files and increase the limit to  a more suitable number but...

I seem to remember a couple of years ago when we had to
support erlang on the BSDi OS, there was the same braindead
FD_SETSIZE limitation.

There was some trickery around it but I don't remember
exactly, but I think it involved modified system headers.

An alternative for your customers that require +1024 fds
is to use OS X 10.4 which use poll() (I think)

> 
> Overall, 1024 file descriptors per Erlang node is WAY too low.


Absolutely, but remember, it's not Erlang that is restricted,
it MacOsX.
You'd have exactly the same problem if the app was written in C.



>>Maybe the environment variable ERL_MAX_PORT might also help in your
>>case. This use to be valid in the past but I do not know if this is
>>still the case:
>>
>>export ERL_MAX_PORTS=32000

How could that help, when there is a buffer overflow in the
fd_set


/klacke



More information about the erlang-questions mailing list