0

I have developed one asp.net application with mysql database connection.Some times i am facing the timeout error when looking at the pages.i also set the connection time. but still am receiving the same error dynamically.I couldn't able to figure it out about in which situation it has occurred.

This is the complete error message that i received...

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.

What are all the parameter i have to monitor to solve this error?

Please guide me to solve this...

rene
  • 41,474
  • 78
  • 114
  • 152
Saravanan
  • 11,372
  • 43
  • 143
  • 213
  • There is only one escape and it is called [using statement](http://msdn.microsoft.com/en-us/library/yh598w02.aspx) – Steve Jul 20 '13 at 12:05

2 Answers2

1

Did you close the connection after you open it..?

try
{
     conn.Open();
     someCall (myConnection);
}
finally
{
     myConnection.Close();                
}

In MSSQL you can check connection by using this "sp_lock, sp_who" .. Check this site: http://www.xaprb.com/blog/2006/07/31/how-to-analyze-innodb-mysql-locks/ for equivalent in mysql

shamcs
  • 629
  • 6
  • 15
0

It means that you are running out of the connections available in the connection pool. You can increase that in the connection string the max pool size. But it is recommendedthat you check why are you not closing the connections after you have used them.

Ehsan
  • 31,833
  • 6
  • 56
  • 65