Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MySQL Error : Socket In Use

Posted on 2011-03-22
1
Medium Priority
?
1,239 Views
Last Modified: 2014-11-12
Hello,

I have a Windows Server 2008R2 box running in the cloud (on Amazon EC2) with IIS enabled.  Our datastore is a MySQL box (hosted on Amazon RDS) on the same region/local network as my web server.

Despite both the web server and mysql box being on the same network, I am getting occasional socket error messages during peak use (when in reality, the peak use isn't that significant at all).  I'm looking to find out how to resolve this:

Server was unable to process your request.  --> Can't connect to MySQL server on 'hostname' (10061): Only one usage of each socket address (protocol/network/address/port) is normally permitted 10.76.249.164:3306 --> Only one usage of each socket address (protocol/network/address/port is normally permitted)

As a web server, there will be many concurrent connections to the mysql server.  Why am I getting errors about the socket address already being in use.  How do I gracefully handle this situation?
0
Comment
Question by:millweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
Swafnil earned 2000 total points
ID: 35196608
I found the following article about the topic on MSDN with some hints on how to fix it:

http://blogs.msdn.com/b/dgorti/archive/2005/09/18/470766.aspx

The problem seems to be that the dynamically assigned MySQL connection port on the MySQL client can not be opened because all ports have already been used; each call to the MySQL server uses one dynamically assigned port on the client-side for as long as the connection is open and alive, so if you are opening a lot of connections in peak times, you'll run out of client ports.

The resolution is to increase the amount of parallel connections which is done by modifying the registry on the web server side. For in-detail information, check the above link and see if this helps.

Regards, Sascha
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question