[erlang-questions] HTTP requests and the meaning of eaddrinuse

Sverker Eriksson <>
Fri Jan 30 15:15:41 CET 2009


Johnny Billquist wrote:
> [...] you will most probably hit the limit of the number of open file 
> descriptors long before you exhaust all the local port numbers. By 
> default on on my mac, the max file descriptors is 256 (per process). 
> There is also a limit on the total number of file descriptors in the OS. 
> Nowhere near the theoretical limit of 65536 ports in tcp. So that should 
> give you enfile or emfile.
>
>   

The internal TIME_WAIT state of the TCP protocol may cause exhaustion of 
port numbers even though the file descriptor limit is much lower than 
65536. Use the netstat command tool to view lingering connections in 
TIME_WAIT state.

/Sverker, Erlang/OTP






More information about the erlang-questions mailing list