Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
can't open more than 1024 tcp ports on osx / erlang
$ uname -a
Darwin RJ3000.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
$ launchctl limit
cpu unlimited unlimited
filesize unlimited unlimited
data unlimited unlimited
stack 8388608 67104768
core 0 unlimited
rss unlimited unlimited
memlock unlimited unlimited
maxproc 709 1064
maxfiles 2048 100000
$ ulimit -n
$ erl +A 4 +K true +P 1000000 -env ERL_MAX_PORTS 100000 -pa ebin/ deps/*/ebin -boot start_sasl
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:8:8] [async-threads:4] [hipe] [kernel-poll:true]
=ERROR REPORT==== 21-Sep-2012::15:16:37 ===
driver_select(0x0000000000000995, 1024, ERL_DRV_WRITE ERL_DRV_USE, 1) by tcp_inet driver #Port<0.2453> failed: fd=1024 is larger than the largest allowed fd=1023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment