The timeout period elapsed prior to obtaining a connection from the pool.

Posted by Madhurit under ASP.NET on 3/12/2012 | Points: 10 | Views : 6030 | Status : [Member] | Replies : 3
Hi,
I did the Website, The website is working fine 3 Months. But After 3 Months i am getting below error.

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 should i do for this error. Can you please help me in a right way!

Thanks inAdvance,

T.Madhuri.




Responses

Posted by: Hmanjarawala on: 3/12/2012 [Member] Bronze | Points: 25

Up
0
Down
This happens normally, when too many connection are in open state.
for that you've to keep track of close connection once it opens or before opening new connection check connectionstate of existing connection object.
and if it is open then just use it.

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Madhurit, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sheonarayan on: 3/12/2012 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
As Himanshu said you should always close the connection once you are done with it.

This particular error should be resolved when you simply re-start your application (change web.config file for a single character or keep one space and save it). See if you can increase the number of maximum connection in your connection string connecting pool settings, this should also solve your problem.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Madhurit, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/12/2012 [Member] Silver | Points: 25

Up
0
Down
In addition you can avoid pooling in connection string property of web.config using pooling=false;
if you use then you can also increase its size like Min Pool Size=10; Max Pool Size=100";

Thanks,
Sanjay

Madhurit, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response