[erlang-questions] listen() backlog limited to 16 bits?
Tue Apr 28 01:42:54 CEST 2009
On Apr 27, 2009, at 3:53 PM, Matthew Dempsky wrote:
> On Mon, Apr 27, 2009 at 10:30 AM, Steven Grady <sgrady@REDACTED> wrote:
>> As Erlang starts to reside in the world of massively-scaled web
>> servers, 16 bits seems to be unnecessary and ill-chosen limitation.
>> Is there any plan to fix this?
> Not arguing against bumping it to 32-bits, but do you actually have
> servers that need to handle more than 65000 yet-unaccepted TCP
> connections? I would expect that if your server regularly has
> thousands of queued TCP connections, that it's way overloaded anyway.
Possibly. Actually, the main problem is that if you pass in a big
number, it gets masked off. if you're unlucky enough to choose a
number like 65536, you'll set it to 0...
In general, we are using mochiweb (modified to use gen_tcp's active
mode) and are only able to handle 1,700 connections a second. We need
to handle probably 5x that. But yeah, we are probably not running
into the 16-bit limit (yet! :-).
Any thoughts on how to increase the numbers of accepts/sec would be
More information about the erlang-questions