You may get an error like this after some executions
"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."
This may have occurred because all pooled connections were in use and max pool size was reached.
(default pool size is 100)
so u must close connections as soon as possible like,
SqlCommand cmd = new SqlCommand(str, con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();