W
William Reyes
I get the following error from my object periodically.
"System.InvalidOperationException. Timeout Expired. The timeout period
elapsed prior to obtaining a connection from the pool. This may have
occurred because all polled connections were in use and the max pool size
was reached."
My object only has one connection object from which all methods perform
database operations. Other objects within my app are coded the same way each
with just one connection object.
I thought when connections are made using the same connection string the
ado.net handled the conection polling automatically.
Is there any way to explicitly remove unused connections from the pool?
Is it possible I am leaving too many connections open?
Should I be closing and "killing the connection object prior to the
destructionr of my object, maybe in the finalizer??
I am just not sure.
Any help would be greatly appreciated.
"System.InvalidOperationException. Timeout Expired. The timeout period
elapsed prior to obtaining a connection from the pool. This may have
occurred because all polled connections were in use and the max pool size
was reached."
My object only has one connection object from which all methods perform
database operations. Other objects within my app are coded the same way each
with just one connection object.
I thought when connections are made using the same connection string the
ado.net handled the conection polling automatically.
Is there any way to explicitly remove unused connections from the pool?
Is it possible I am leaving too many connections open?
Should I be closing and "killing the connection object prior to the
destructionr of my object, maybe in the finalizer??
I am just not sure.
Any help would be greatly appreciated.