mysql连接太多-睡眠线程太多?

mysql连接太多-睡眠线程太多?,mysql,subsonic,Mysql,Subsonic,我从mysql数据库中得到这个错误 error connecting: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. 我有一个网站和控制台应用程序与数据库对话,但我

我从mysql数据库中得到这个错误

error connecting: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
我有一个网站和控制台应用程序与数据库对话,但我肯定没有100个并发连接!我做了一个showprocesslist查询,发现了大约10个连接,使用SLEEP命令,时间大约为16000秒。没有100个连接

我正在使用亚音速数据提供程序与数据库对话,我相信这会立即关闭数据库连接,不会让它们挂起,所以这不是罪魁祸首

我重新启动了mysql服务器和与数据库对话的控制台应用程序,它似乎工作正常,但我自然不能让任何一个控制台/网站应用程序像这样崩溃。查看错误日志,此错误似乎即将出现

请你给我一些建议,我可以做些什么来了解发生了什么,以及我如何解决它

编辑:我对此进行了更多的研究,似乎这是亚音速/mysql的问题。我在下面的链接中尝试了建议的修复方法,在finally块中关闭连接,但没有任何东西关闭连接

   Dim sp As StoredProcedure = SPs.GetLastGPSDataForAllVehicles(customerID)
            Dim reader As IDataReader
            Try
                reader = sp.GetReader
                MyBase.Load(reader)
            Catch ex As Exception
            Finally
                reader.Dispose()
                reader = Nothing
                sp.Command.ToDbCommand().Connection.Close()

            End Try
我不知道如何强制关闭连接

非常感谢

这有帮助吗,或者这个: