Connection Pooling Issues

fishAnyone?

New member
Joined
May 5, 2010
Messages
2
Location
Malta, EU
Programming Experience
1-3
Hello everyone,

I have a data driven application in VB which works with an SQL Server 05 Database.

Since this app makes use of many queries and commands, occasionally i'me getting a timeout error as the connection pool is full. So i figured that at a specifc point in time within the app, i'll clear the connection pools using the ClearAllPools method rather than increase max pool size.

I'm using the performance monitor on my XP development machine (NumberOfPooledConnections) however not once do i see the number of Pooled Connections reset to 0 even when that method is called.

How can I determine that my solution is working (if it is) before I deploy the update?

Thanks,

fish.
 
I'm not sure why you'd be getting that error in the first place unless you have multiple connections being made on multiple threads simultaneously. Are you closing your connections after using them?
 
connection pooling

Hello, thanks for the reply.

Most of my DB command and datasets are done manually in code, and yes i'm closing and disposing the connections every time.

However the error occurs when calling the Fill method of a table adapter in a defined dataset (xsd file). Here i'm assuming that I shouldn't add any code to close the connection. This method is called many times in my application and somehow the number of connections in the pool reaches the limit.

The strange thing is that the connections seem to be reclaimed from the pool or not intermittently, meaning that the number of conns in the pool does not necessarily increase every time the Fill method is used.

Now I have deployed the new update with the ClearAllPools method placed strategically in the program and I'll be keeping an eye on it.

I'll keep you posted as this issue seems to be somewhat common but not too much info is around.


Thanks.
 
Back
Top