[Mono-list] Connection pooling?

Aleksandar Dezelin dezelin32@fastmail.fm
Wed, 29 Dec 2004 13:16:23 +0100

Eric Scott wrote:
> Yo;
> I've got the mono 1.0.4 release with XSP and all that fun stuff.  I keep 
> getting a "object was used after it was disposed" error with my Npgsql C#/ASP 
> apps.  I found with google that I can get around the problem by disabling 
> connection pooling... how do I do that?
> Thanx,
>    Sigma

Look for the SqlConnection class in MSDN and pay attention to connection 
string property - there's a parametar which you can pass inside it to 
disable connection pooling. It's something like 'Polling=false'. You may 
also check Npgsql classes and search for the method that parses the 
connection string.

Another thing I will submit as a bug: when you have enough opened 
connection and connection pooling is on, when you reach the number of 
opened connections test application hangs. But it never thow an 
exception, just hangs until (I think) some of the connections closes.

Aleksandar Dezelin

Linux is like wigwham - no windows, no gates, and apache inside...