erlang 最大的tcp连接数

1.同时打开的端口数量限制(Open ports):

system_info (port_limit).

erlang对同时打开的端口数量做出了限制。默认是65536, 可以通过环境变量ERL_MAX_PORTS修改,或者配置erlang启动参数(标志+Q)修改。(说明:在OTP17以后的版本就会移除环境变量ERL_MAX_PORTS的支持

2.同时打开的文件和socket数量限制

erlang:system_info (check_io).

的{max_fds,1024}

能同时打开的最大文件数

sudo vim /etc/security/limits.conf

加入

*         soft    nofile  100000

*         hard    nofile  100000

两句话,然后重启

猜你喜欢

转载自wudixiaotie.iteye.com/blog/2213342