Only one usage of each socket address (etc) error

Only one usage of each socket address (etc) error

Old forum URL: forums.lhotka.net/forums/t/7218.aspx


danv posted on Thursday, July 02, 2009

Hello,

We have a sequence of code that retrieves BLOB-s from a database exposed via a DataPortal. When retrieving a large number of BLOB-s in a loop, the code stops with the error message below:
Could not connect to net.tcp://localhost:9000/Svc. The connection attempt lasted for a time span of 00:00:00.0468750. TCP error code 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted 127.0.0.1:9000.
A netstat -a command displays a huge number of connections to port 9000, and all of them in TIME_WAIT state.
Our guess is the TCP/IP channel is continuously open and closed and, to avoid this, we should cache either the proxy, either the underlying TCP/IP connection.
Is there a way to do this?

Copyright (c) Marimer LLC