ErrorSystem.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.
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 to do :a) In connection String put
- Code:
-
;Connect Timeout=0
b)Make sure all your connections are force closed
The place where you are getting this error or everywhere where you are assigning a connection string, do below: example
- Code:
-
SqlConnection connection = getConnection()
try
{
connection.Open;
Do whatever you want to with it...
}
finally
{
connection.Close();
}
getConnection - returns an SqlConnection object (You have to write this by your own)
c)If problem is still there
In connection string also add
- Code:
-
;Max Pool Size=10000