You probably need to configure gen_tcp
here.
https://www.erlang.org/doc/apps/kernel/gen_tcp.html#listen/2
Specifically the backlog option, to allow more connections in the queue.
You may also want nodelay from here:
https://www.erlang.org/doc/apps/kernel/inet#setopts/2
{nodelay, Boolean}
(TCP/IP sockets) - IfBoolean == true
, optionTCP_NODELAY
is turned on for the socket, which means that also small amounts of data are sent immediately.