I am getting this error from a mysql database
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.
I have a website and console application talking to the database but i certainly dont have 100 concurrent connections! I did a showprocesslist query and found about 10 connections with a command of SLEEP and time of about 16000 seconds. There wasn't 100 connections.
I am using subsonic data provider to talk to the database and i believe this closes database connections immediately and doesnt leave them hanging so this isn't the culprit.
I restarted mysql server and my console application that talks to the database and it seems to be working ok but naturally I can't have the either console/website application crashing like this. Looking at the error log this error seems to be coming up
Please could you advice on anything I can do to find out what is going on and how i can fix it
EDIT: I have looked into this more and it appears it is subsonic/mysql issue. I have tried the recommended fix in the link below by closing the connection in a finally block but nothing closes the connection...
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
I have no idea how to force the connection to close.
thanks a lot