Skip navigation links

MySQL Forums :: Performance :: Connections Sleeping not disconnecting


Advanced Search

Connections Sleeping not disconnecting
Posted by: Nick Arnone ()
Date: January 24, 2013 02:32PM

I have 2 servers, one runs Windows Server 2000 and the other is a Unix server. The Windows machine runs ASP w/ VB Script. The Unix box has MySQL on it.
The ASP’s call the MySQL for data.
My code will open a connection, do a function, close the connection then set it to Nothing.
The MySQL does not disconnect but goes into sleep command when the Windows Server was to disconnect. I found if I kill a connection on the MySQL, the Windows machine will error out when executing an SQL statement. It was as if I did not open the connection to the database, which is not the case.
Our traffic is heavy, which leaves a lot of connections up on the MySQL server, which in turn slows down the entire system.
If I did not know better, it seems the Window Server thinks a connection still exist even though I have killed the connection both in the program and even though I establish a new connection, the Windows machine seems to skip that part as if it is going to use a current connection.
We set the time out to 2 seconds in the MySQL server. It did time out and close on the MySQL server and then the Windows Machine would error out because I believe it tried to use a connection it thought was there.
I can watch the connections based on ID numbers and I watch as ID connections are used over and over again until they are finally time out and go away.
My Windows Server access the MySQL server several hundred thousand times a day. These connections can really add up and slow the system down.
How do you closes these connections so the Windows Server knows to open a new connection?

Options: ReplyQuote


Subject Views Written By Posted
Connections Sleeping not disconnecting 1777 Nick Arnone 01/24/2013 02:32PM
Re: Connections Sleeping not disconnecting 696 Rick James 01/25/2013 08:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.