public
Created

can't open more than 1024 tcp ports on osx / erlang

  • Download Gist
max_fs_limit_osx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
$ 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
100000
 
$ 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]
 
...SNIP...
 
=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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.