[Haskell-cafe] Libevent FFI problems

Levi Greenspan greenspan.levi at googlemail.com
Sat Jul 26 07:34:13 EDT 2008

On Fri, 2008-07-25 at 13:45 -0700, Adam Langley wrote:
> I'd suggest that you write your server on the select() based system
> as-is for now. Then, when you need epoll you'll be sufficiently
> motivated to hack up the RTS to include it ;)

The problem with a select() based approach is that I can not have more
than 1024 parallel connections on my Linux system, since this is the
upper limit for the number of file descriptors in the FD_SET used by


# ulimit -n 10000
# <start client with many open connections>

client: internal error: awaitEvent: descriptor out of range
    (GHC version 6.8.3 for i386_unknown_linux)
    Please report this as a GHC bug:

This is caused by having more file descriptors than FD_SETSIZE (which is
1024) on my system. So clearly select() doesn't scale to the numbers I
need :-(


More information about the Haskell-Cafe mailing list