Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is happening on a server that has been in constant use for over a year, with SQL Server 2008 and the web applications all hosted on the same machine. This morning i had 100-or-so emails with errors from the server that looked like so:

1: Error Description:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: TCP Provider, error: 0 - Only one usage of each socket address (protocol/network address/port) is normally permitted.)

This happened at around 5:30am, then around 9am, then around 11am, and again around 3pm. I can see these errors in the Event Viewer, but SQL Server seems oblivious of any problem (nothing in the logs there).

i looked here already: but all of our applications look like they have 'pooling=true' in their connection strings.

Running 'netstat -aon' shows that there are lots of waiting connections:

TCP   TIME_WAIT       0
TCP   TIME_WAIT       0
TCP   TIME_WAIT       0
TCP   TIME_WAIT       0
TCP   TIME_WAIT       0
TCP   TIME_WAIT       0
TCP   TIME_WAIT       0

( is the server's internal ip, and 55823 is the port that SQL Server listens on)

That last one is from port 65535, isn't that the last one for dynamic ports?

Any thoughts would be much appreciated - do i need to try to start tracking down connections not being closed properly in applications on this server? There hasn't been a big increase in use/traffic on this server, any pointers at what to look at to try to determine why this has started happening now?

share|improve this question
Your guess might be right, sounds like you have a connection leak, the connections aren't being closed down and being returned to the pool, or aren't eligible for pooling for some reason. Eventually you'll run out of sockets to open. How many rows did netstat return? Did you change anything with your application pool settings? – SqlACID Mar 5 '11 at 0:54
Total? There was something like in all, and i would guess over 10,000 that looked like from local to local on the SQL Server port. Is that even possible? – ilasno Mar 5 '11 at 6:31
Ah sorry, took more than the five minute limit to get the info together :-/ Total? There was something like 43,670 in all, and i would guess over 10,000 that looked like from local to local on the SQL Server port. Is that even possible? There was a bunch at the end that looked like: UDP : 1628 No, no changes to the application pool settings in recent memory (at least a few months). It's set to recycle once per day at 2:15am. – ilasno Mar 5 '11 at 6:40
SQL can handle that many incoming connections, but that's a lot to be generated from a single app, I thought there was a limit around 3000 or so for initiated connections. In any case, there's definitely an issue with connections not getting closed, time to dig in to the code I would say. – SqlACID Mar 7 '11 at 2:46

We have had similar issues - we seem to have found our issues being caused by the data collector feature in SQL 2008 when having all the instances monitored by a remote instance running data collector.

This may not be the same root cause though...just my two cents.

share|improve this answer
I'm not familiar with the data collector feature, and there's no remote instances, unless me connecting with SSMS counts as a 'remote instance'? – ilasno Mar 5 '11 at 6:26
If your not familiar then I would doubt that feature is even running. The data collector is a service that collects performance and query information about your database instance. – Ian Chamberland Mar 5 '11 at 23:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.