Client-side TCP socket receiving "Address already in use" upon connect
Tor Erik
torerik81 at gmail.com
Sat Sep 2 17:05:31 EDT 2006
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 it used 4000 connections ago, resulting in an "Address already
in use" exception.
A possible solution to this would be to keep the connection to each
remote host open, but that would require parsing of the received data
into the data items (which are files by the way) sent by the application.
My question is if there are any other methods of solving this? Maybe a
socket option of some sort...
regards
More information about the Python-list
mailing list