homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

Max Pool Size Was Reached
Issue relating to converting from VB.Net 2002 to VB.Net 2003

10+ Year Member

Msg#: 1785 posted 5:13 am on May 11, 2004 (gmt 0)

After converting a VB.Net Win Forms 2002 project to 2003 a new problem has occurred.

After a number of calls in getting a data adapter filled I now get "Timeout expired. The timeout period has 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 is unusual since the project worked in 2002.
I have spent ages debugging the code to find any possible loose connections. I have tried adding connection.close statements, execute dispose methods for data adapter, increase the timeout period.

Although I can increase the pool size it does not permanently solve the problem.

I believe Vladi posted a similar problem but the posting had expired so I don't know if he found a solution



10+ Year Member

Msg#: 1785 posted 2:08 pm on May 11, 2004 (gmt 0)

Might be some help. Is your connection already open when you call the Fill/Update methods?

You can also run into problems when you use the DataAdapter object. The DataAdapter Fill and Update methods automatically open the DataAdapter object's connection and close it after the data I/O operation is complete. However, if the connection is already open when the Fill or Update method is executed, ADO.NET doesn't close the SqlConnection after the method completes. This is another opportunity to leak a connection.

[msdn.microsoft.com ]


10+ Year Member

Msg#: 1785 posted 6:48 pm on May 11, 2004 (gmt 0)

Best bet is to carefully and explicitly close and destroy all database objects - result sets, query objects, connections, etc. -- don't rely on .NET to do it for you.

I know cleaning up after yourself is a foreign concept to VB programmers, but it seems to be necessary in .NET regardless of what the docs say... ;-) (Plus, it's a good idea no matter what language you're using.)


10+ Year Member

Msg#: 1785 posted 12:01 am on May 12, 2004 (gmt 0)

After almost giving up I managed to solved my problem after all. The problem was the project had for some reason turned on SQL Server debugging. As soon as I turned it off no more pooling problems. This may have occurred during the conversion from 2002 to 2003 so be aware.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved