From: Shawn Green Date: October 23 2012 4:15pm Subject: Re: mysql threads too high List-Archive: http://lists.mysql.com/win32/19184 Message-Id: <5086C2B8.7080602@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/23/2012 8:59 AM, Tal Ben-Gal wrote: > The client application using MySql connector (in VB DOT NET) each client open 8 connections (in a pool) and sty open as long as the client running, all connections is closing properly once the client application end. > > The situation is even worth if I try to open and close the connection each time the client need connection to Mysql, in this case the threads getting to 1250 even faster. > > It is only happens with Mysql, the same application running in different location with MS SQL and no problem there. > > Defiantly Mysql issue > It is not "definitely a MySQL issue". Turn off your pooling. If the connection count stays high (many of them in the Sleep state) then your application is NOT closing them properly. This is a coding/usage problem. Also, you do not need to open a new connection for every little thing. Open one connection per block of work to perform. Also, do not leave your connections or transactions open while waiting for a person to do something. For example, a web-based application will generally need only one or two connections per page. Transactions should not remain active between page accesses as each request will use a different connection even if they are coming from a pool. Remember, abandoning a connection object for garbage collection or closing the TCP/IP socket is not the same as actually calling the .close() method for your connection library. Let us know your results. -- Shawn Green MySQL Principal Technical Support Engineer Oracle USA, Inc. - Hardware and Software, Engineered to Work Together. Office: Blountville, TN