Home > Forum > ASP.NET > Error: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool

Error: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool

by Thamil   on Sep 14, 2014   Category: ASP.NET  |  Views: 905    |  Points: 5   |  Gold 
  Reply
Hello friends ,

Please find below error while tryin to access from client machines?


"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."

Question posted on behalf of nagendra varma.

Bookmark and Share:
 
  User Reply  | Ask a question  |   Reply 
  Re :Error: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool   
by Thamil
on Sep 14 2014 2:36AM
Points : 10
Gold 
Hi Nagendra varma,

Connection pool size reaches the maximum connection because opening the connection without closing. So try the below Using statement when you open sql connection and .net will manage the pooling

using (SqlConnection conn = new SqlConnection(conStr))
{
conn.Open();
//Your code here
}

Recent Post

Latest Posts