[erlang-questions] phantom ports in erlang:ports()

Valentin Micic valentin@REDACTED
Fri Nov 16 10:40:23 CET 2012


I guess, a more interesting questions is weather or not sockets in this state may be seen as "phantom" ports?

V/

On 16 Nov 2012, at 11:32 AM, Jesper Louis Andersen wrote:

> 
> 
> On Nov 16, 2012, at 7:29 AM, Valentin Micic <valentin@REDACTED> wrote:
> 
>> I am wondering if this may be attributed to CLOSE_WAIT/TIME_WAIT states sockets may be in during the connection shutdown?
>> By the some token, if the server in question has a higher frequency of short-lived connections,  this may also explain discrepancy between number of file descriptors as reported by lsof and number of active ports reported by emulator.
>> 
> 
> TIME_WAIT is not a problem. It is just the kernel keeping track of the connection if packets get sent still by the other end. CLOSE_WAIT on the other hand sounds bad. This state should happen when the other end has sent a FIN and started to close down the socket, but the application (i.e., Erlang?) has not closed the socket down yet.
> 
> If you have lingering CLOSE_WAITs that are there for a long time it is usually a warning sign that something may be bad.
> 
> Jesper Louis Andersen
>  Erlang Solutions Ltd., Copenhagen
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list