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."
Message from the system: "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."
Always close your connection in the final block:
or
Increase pool size like in your connection string
string connectionString = "Data Source=localhost; Initial Catalog=Northwind;" + "Integrated Security=SSPI; Min Pool Size=10; Max Pool Size=100";
Don't use pooling
string connectionString = "Data Source=localhost; Initial Catalog=Northwind;" + "Integrated Security=SSPI; Pooling=false;";
Comments
Post a Comment