Erlang raise number of opened sockets, MacOS and C

2019-07-08 05:41发布

问题:

I'm trying to open connections (sockets) to my Erlang server; everything works fine with around 100 paralell connections, but when I want more than 100 i get {error, closed}.

It may be something that has to do with OS file descriptor limit? If yes, can you guys please give me a solution? I use MacOS and CentOS.

Should I give some params to the Erlang Vm in vm.args file?

回答1:

Open sockets limit in erlang relies on two things:

  1. OS max open files limit, you can check how two tune it here
  2. Erlang VM +Q flag for max open ports, check out it here