Question

TCP Provider: Only one usage of each socket address is normally permitted. ...error after server migration.

Asked by: bbraman

We recently moved both our SQL Server 2005 database and Classic ASP coded website from a Windows Server 2003 to a Windows Server 2008, now calls to the database intermittently fail with the following error message:

TCP Provider: Only one usage of each socket address (protocol/network address/port) is normally permitted.

This error never occured on the old server, I suspect I've just got a setting wrong somewhere, or moving from IIS 6 to IIS 7, or from Windows Server 2003 to Windows Server 2008 has introduced this new problem.

Our traffic volume has not changed, each page on our website includes a file containing a SQL Native Client connection string in the following format just as it did on the old server:

Provider=SQLNCLI;Server=127.0.0.1,58646;Database=database99;Uid=sqluser99;Pwd=R76D2Wp99;

Using Sysinternals TCPView I sometimes see thousands of lines in a TIME_WAIT state, with both local and remote addresses beginning with 127.0.0.1.  I know I can modify the Windows registry to increase the dynamic port range, or reduce the TIME_WAIT delay value.  But I would prefer to determine the root cause of the issue.

To Recap, same Classic ASP web app connecting to SQL Server 2005 on old Windows Server 2003/II6 works fine, I move everything to Windows Server 2008/II7 and database requests intermittently return the error: TCP Provider: Only one usage of each socket address (protocol/network address/port) is normally permitted.

A good answer to this question will inform me how to prevent this error from occuring in the future without resorting to changing MaxUserPort or TCPTimedWaitDelay values in the Windows registry.

Thank you for reading my question, I appreciate it.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-07-30 at 12:54:52ID24614356
Tags

SQL Server 2005

,

IIS 7

,

SQL Native Client

,

Classic ASP

Topics

SQL Server 2005

,

MS SQL Server

,

Web Languages/Standards

,

Active Server Pages (ASP)

Participating Experts
1
Points
0
Comments
11

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. error-socket operation not permitted?
    when i run a socket program at my college LAN i am gettting an error that socket operation is not permitted. it it require root permissions? but root access is not possible at college LAN login to me? how to resolve this problem tell me?
  2. NEED DMV PERMIT?
    I NEED SOME HELP I NEED TO KNOW IF THERE IS ANY WEBSITE OUT THERE THAT MAY SELL THE ACTUAL DMV PERMIT TEST FOR NJ BECAUSE THE TEST HAS THE MOST RIDICULAS QUESTIONS IVE EVER SEEN AND I FAILED IT TWICE OR IF THERES ANYONE OUT THERE WHO CAN GET ME A DRIVERS LICENSE THAT WOULD BE...
  3. WinXP permitions....
    Greetings...... Anybody know how can I setup the permitions to user on WinXP that he will be able delete only print jobs from local shared printer? I do not want them use administrator account for this job. Thanks for all answers.....
  4. no permit dupes in listbox1
    from combobox1 is possible to not permit a dupes insertion in listbox1? in effect if alreday existis a value in listbox and a the user select the same value from combobox1 not permit insertion and show msgbox: attention the value:.... is alreday added... here the file: http:...
  5. The local policy of this system does not permit you to logon i…
    Hi, I have a Windows 2000 domain controller. Somehow when I was configuring the policy, I think I messed up by defining the domain Administrator account as local Administrator. Then I got this error after reboot "The local policy of this system does not permit you to...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: jimpenPosted on 2009-07-30 at 13:59:05ID: 24984350

Was the old SQL Server using the 58646 port?  Why?

Is the SQL Server Browser Service up and running?

Have you changed the port on the new server?

And is the UID and PWD real in the connection string? If so please click on the Request Attention link and ask to have them masked.

 

by: bbramanPosted on 2009-07-30 at 14:59:04ID: 24984783

Thanks for your comment jimpen.  Connection string shown is just an example of how ours is formatted.

Both my old and new servers run SQL Server 2005 on port 58646 for reasons of security through obscurity.

According to the SQL Server Configuration Manager, SQL Server Browser is stopped, with Start Mode set to Disabled

 

by: jimpenPosted on 2009-07-30 at 16:24:04ID: 24985250

Ok, this one will probably take some work to troubleshoot. You up for it?

What SP are you on? SSMS --> Help --> About --> Copy info.

Have you run the profier against the server & db(s)?

What are the server specs old to new?

Have you looked at perfmon?

 

by: bbramanPosted on 2009-07-31 at 04:48:16ID: 24987895

SQL Server 2005 Service Pack 3

Microsoft SQL Server Management Studio      9.00.4035.00
Microsoft Analysis Services Client Tools      2005.090.4035.00
Microsoft Data Access Components (MDAC)6.0.6001.18000 (longhorn_rtm.080118-1840)
Microsoft MSXML                                    3.0 6.0
Microsoft Internet Explorer                        7.0.6001.18000
Microsoft .NET Framework                        2.0.50727.3074
Operating System                                    6.0.6001

I've run perfmon just now, and the profiler against the SQL instance but I'm not seeing anything unusual.  I'm not very experienced using these tools.  Any clues about what to look at?

Server specs old to new (via PC Wizard 2009):

OLD Server

Mainboard :      FUJITSU SIEMENS D2461-C1
Chipset :      nVidia nForce 410
Processor :      AMD Athlon X2 BE 2350 @ 2100 MHz
Physical Memory :      1024 MB
Video Card :      Nvidia Corp GeForce 6150 LE
Network Card :      Nvidia Corp MCP51 Ethernet Controller
Operating System :      Microsoft Windows Server 2003 Professional 5.02.3790 Service Pack 2

NEW Server

Mainboard :      FUJITSU SIEMENS D2461-C1
Chipset :      nVidia nForce 410
Processor :      AMD Athlon 64 @ 2400 MHz
Physical Memory :      2048 MB (2 x 1024 DDR2-SDRAM )
Video Card :      RDPDD Chained DD
Network Card :      Nvidia Corp MCP51 Ethernet Controller
Operating System :      Windows (R) Web Server 2008 Professional 6.00.6001 Service Pack 1

 

by: jimpenPosted on 2009-07-31 at 09:55:36ID: 24990576

At 2GB you are essentially going to be hitting memory and page swapping on a regular basis.

The recommendation for the Web Server alone is 2GB. SQL Server will try to take 2GB by the default install. Its minimum spec is 512.

As far as what to look at in the perfmon:

Pages/Sec
Avg. Disk Byte/Transfer
Avg. Disk Queue Length
% Processor Time
NIC Throughput
then under the SQL ones
Lock Timouts/Sec            SQLServer:Locks
Lock Requests/Sec         SQLServer:Locks
Deadlocks/Sec                SQLServer:Locks
Buffer Cache hit ratio      SQLServer:Buffer Manager
Page Life expectancy      SQLServer:Buffer Node


Windows Web Server 2008
http://www.iis.net/default.aspx?tabid=27

SQL Server 2005 32-bit System Requirements
http://www.microsoft.com/sqlserver/2005/en/us/system-requirements.aspx

 

by: bbramanPosted on 2009-07-31 at 12:53:37ID: 24991899

Not much activity on the server this afternoon, so using perfmon is not showing much.  Again the old server didn't have this issue and it had half the system memory to work with.  The database grows very slowly.

Again my problem is the error:
TCP Provider: Only one usage of each socket address (protocol/network address/port) is normally permitted.

Are you telling me that the most likely root cause of thousands of TCP 'connections' in a TIME_WAIT state is that the database is not handleing requests in a timely manner?  Just some context, this error is being logged roughly 15 times a day, I have only encountered it one time, I reloaded the page and everything was fine, otherwise site performance is normal.  I am wondering if database connection pooling is not happening, or why a TCP connection is even necessary since the request and destination are both the local machine at 127.0.0.1

Thanks for reading.

 

by: jimpenPosted on 2009-07-31 at 13:55:40ID: 24992377

I think this link will explain the issue fully and has a resolution:
---------------------------------------------------------------
Common tips and tricks from a SQL Developer Support perspective
http://blogs.msdn.com/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
---------------------------------------------------------------

>> or why a TCP connection is even necessary since
>> the request and destination are both the

Technically anything that isn't an SQL Service application uses TCP (or other network protocol) to connect SQL, even if it is on the same box. There really isn't a way around it.

 

by: bbramanPosted on 2009-09-02 at 14:13:31ID: 25245756

Ok, I changed my connection string (see below) based on your suggestion, but I still have a thousands of TCP connections to the database and database requests are still intermittently failing with the following error message:  TCP Provider: Only one usage of each socket address (protocol/network address/port) is normally permitted.

BEFORE:
Provider=SQLNCLI;Server=127.0.0.1,58646;Database=databasename;Uid=username;Pwd=password;

AFTER:
Provider=SQLNCLI;pooling=true;Persist Security Info=True;Server=127.0.0.1,58646;Database=databasename;Uid=username;Pwd=password;

But I don't think it will make a difference given the page you reference states ' if the application is not a .Net app, instead it uses, for example VBScript, it will not use pooling '  Again this is a Classic ASP application not the newer .NET

Apologies for the delayed response, any ideas?

 

by: bbramanPosted on 2009-09-03 at 10:56:43ID: 25253127

OK, thank you very much for your efforts jimpen.

 

by: bbramanPosted on 2009-09-30 at 15:21:09ID: 25464223

A couple months on now, I appear to have solved my own issue by simply checking the 'Boost SQL Server priority' checkbox on the 'processors' tab of server properties screen.  It was checked on the old server, and I had not checked it on the new one.  Guess that definitely means the new box is short on system resources for what I am trying to do with it.  Also, I am currently using a SQLOLEDB database connection string instead of the SQL Native Client I was using before.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...