Welcome to WebmasterWorld Guest from 54.226.183.49

Forum Moderators: ocean10000

Message Too Old, No Replies

Max Pool Size Was Reached

Issue relating to converting from VB.Net 2002 to VB.Net 2003

     

plapic

5:13 am on May 11, 2004 (gmt 0)

10+ Year Member



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

duckhunter

2:08 pm on May 11, 2004 (gmt 0)

10+ Year Member



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 ]

martyt

6:48 pm on May 11, 2004 (gmt 0)

10+ Year Member



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

plapic

12:01 am on May 12, 2004 (gmt 0)

10+ Year Member



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month