Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: http://blogs.msdn.com/b/spike/archive/2008/08/26/provider-tcp-provider-error-0-only-one-usage-of-each-socket-address-protocol-network-address-port-is-normally-permitted.aspx 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    10.208.210.239:65529   10.208.210.239:55823   TIME_WAIT       0
TCP    10.208.210.239:65530   10.208.210.239:55823   TIME_WAIT       0
TCP    10.208.210.239:65531   10.208.210.239:55823   TIME_WAIT       0
TCP    10.208.210.239:65532   10.208.210.239:55823   TIME_WAIT       0
TCP    10.208.210.239:65533   10.208.210.239:55823   TIME_WAIT       0
TCP    10.208.210.239:65534   10.208.210.239:55823   TIME_WAIT       0
TCP    10.208.210.239:65535   10.208.210.239:55823   TIME_WAIT       0

(10.208.210.239 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
1  
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 0.0.0.0:57853 : 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

1 Answer 1

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

 
discard

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.