Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-04 Thread Rhamphoryncus
Felipe Almeida Lessa wrote: 2006/9/3, Alex Martelli [EMAIL PROTECTED]: Reflecting on the OP's use case, since all connections are forever being made to the same 16 servers, why not tweak thinks a bit to hold those connections open for longer periods of time, using a connection for many

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Tor Erik
Sybren Stuvel wrote: Tor Erik enlightened us with: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. Which OS are we talking about?

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread keegan . csmith
I've read about SO_REUSEADDR. As far as I understand, this is what SO_REUSEADDR is for: ... I've tried setting this option, but could not see any notable changes... I was having a similiar problem as you, where as soon as my program exited, it would get started up again, but could not bind to

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Fredrik Lundh
Tor Erik wrote: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. what does netstat say about these sockets ? /F --

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: I've read about SO_REUSEADDR. As far as I understand, this is what SO_REUSEADDR is for: I've tried setting this option, but could not see any notable changes... I was having a similiar problem as you, where as soon as my program exited, it would get started

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Tor Erik
Fredrik Lundh wrote: Tor Erik wrote: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. what does netstat say about these sockets ?

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Tor Erik
Tor Erik wrote: Fredrik Lundh wrote: Tor Erik wrote: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. what does netstat say about

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Steve Holden
Tor Erik wrote: Tor Erik wrote: Fredrik Lundh wrote: Tor Erik wrote: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. what does

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Alex Martelli
Steve Holden [EMAIL PROTECTED] wrote: ... set registry key: KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\M axUserPort to a new DWORD value... (5000 - 65534) The default in XP is 3976 - http://support.microsoft.com/kb/Q149532 I wonder why (performance under

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Felipe Almeida Lessa
2006/9/3, Alex Martelli [EMAIL PROTECTED]: Reflecting on the OP's use case, since all connections are forever being made to the same 16 servers, why not tweak thinks a bit to hold those connections open for longer periods of time, using a connection for many send/receive transactions instead

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Alex Martelli
Felipe Almeida Lessa [EMAIL PROTECTED] wrote: 2006/9/3, Alex Martelli [EMAIL PROTECTED]: Reflecting on the OP's use case, since all connections are forever being made to the same 16 servers, why not tweak thinks a bit to hold those connections open for longer periods of time, using a

Client-side TCP socket receiving Address already in use upon connect

2006-09-02 Thread Tor Erik
Hi, The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. At this point is seems that connect loops and starts using the same local addresses