Search code examples
erlangconnectionlimitmochiweb

Erlang: How do I allow more than 1024 connection with Mochiweb?


I tried to increase file descriptors max limit on GNU/Linux:

$ ulimit -n 999999

and I'm starting the server with -env ERL_MAX_PORTS 4096.

Whenever I'm using test util, after 1012-1024 opened connection I'm getting the messages "Closed: socket_closed_remotely" and "Closed: emfile".


Solution

  • I found my mistake. I called ulimit for another shell.