[erlang-questions] {error, emfile} on windows

Matthew Sackman matthew@REDACTED
Tue Nov 30 12:20:44 CET 2010

On Mon, Nov 29, 2010 at 11:18:21PM -0500, Kaiduan Xie wrote:
> I tried to create 1K TCP/TLS client connections on a Windows box, and
> got {error, emfile} error, any idea to solve it? I have no problem on
> Linux after raising the ulimit.

Whilst in theory windows has a limit of around 16M fds per process, the
Erlang windows port seems to use bits of the MS C runtime. This seems to
limit severely wrt number of available sockets.

Whilst erlang:system_info(check_io) reports 2048 under Windows, that's
clearly wrong. But hey, a few years ago, I found that fsync under the
Windows port was implemented as "return 1;". Such is the quality of the
Windows port.


More information about the erlang-questions mailing list