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

Philip Fennell Philip.Fennell@REDACTED
Tue Feb 10 10:21:38 CET 2009


Per wrote:

> 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.

Yes I believe that was the case.

For anyone who is interested, I get one of our clever Ops chaps to
create me the following 5 lined .reg script that updates the registry:



Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"MaxUserPort"=dword:00001388
"TcpTimedWaitDelay"=dword:0000001e



Where:
MaxUserPOrts = 5000
TcpTimedWaitDelay = 30 (seconds I presume, or maybe milliseconds?)

Once I double-clicked on the file and re-started my PC I no longer got
any eaddrinuse errors.

Just that that might be useful to someone.


Regards and thanks for everyone's help,

Philip Fennell



-----Original Message-----
From: Per Hedeland [mailto:per@REDACTED] 
Sent: 06 February 2009 08:02
To: Philip Fennell
Cc: erlang-questions@REDACTED
Subject: Re: [erlang-questions] HTTP requests and the meaning of
eaddrinuse

"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

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					



More information about the erlang-questions mailing list