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

Per Hedeland per@REDACTED
Fri Feb 6 09:02:17 CET 2009


"Philip Fennell" <Philip.Fennell@REDACTED> wrote:
>
>I must admit that a lot of that was way outside of my area but from what
>I gather I'm running-out of available ports, and netstat tells me, by
>its last line of output:
>
>> TCP    PC-S051049:5000        pal.sandbox.dev.bbc.co.uk:5984
>TIME_WAIT
>
>That I have 5000 ports in the TIME_WAIT state.

Unless netstat output on Windows is radically different from *nix, it
doesn't mean that - each line represents (at most) one connection. The
above would represent a connection between a local port 5000 and a
remote port 5984, that is in the TIME_WAIT state (i.e. a potential
"troublemaker").

Now if you have 5000 lines with TIME_WAIT... - or at least a "large
number", which may be the (default) size of the "port range" (as
discussed in the thread) on Windows - you probably have the reason. In
which case one way to avoid it may be to increase the port range - if
it's possible on Windows, google can probably tell you how it's done.

--Per



More information about the erlang-questions mailing list