[Mono-list] Npgsql bug? Timeout while getting a connection from pool

Francisco Figueiredo Jr. francisco at npgsql.org
Thu Aug 14 15:10:52 EDT 2008


On Thu, Aug 14, 2008 at 3:24 PM, matthieu Barthélemy
<bonsouere at gmail.com> wrote:
> Hi all,
>

Hi, Matthieu!

> I just installed the 2.0-preview of mono, with all packages, from the
> Opensuse 10.3 repository.
>
> My app opens several (between 4 and 8 for now ) connections, each one
> in a different thread. Everything works fine during 3-4min, and then
> it raises this exception :


Can you check if you are closing all your connections after using it?

You can see if you are leaking some connection by enable logging of
Npgsql and look for connection leaking messages.

The first explanation which comes to my mind regarding why you may be
having this problem now is that gargabe collection on Mono may have
changed from 1.9 to 2.0. Npgsql has code to fix connection leaking but
only when the connection is gargabe collected. If the runtime takes
more time to collect, your pool may exhaust first.

Also, what Npgsql version are you using?

I would recomend to use the Npgsql from downloads.npgsql.org as the
version which comes bundled with Mono is the Npgsql1 version. We are
working to get the Npgsql2 boundled with the final Mono release.

I hope it helps.


-- 
Regards,

Francisco Figueiredo Jr.
http://fxjr.blogspot.com
http://www.npgsql.org


More information about the Mono-list mailing list