From: J. W. Ulbts <magog001@web.de>
To: pgsql-jdbc@postgresql.org
Subject: Re: DataSource.setMaxConnections() - Does not work
Date: Sun, 27 Sep 2009 12:39:03 +0200
Message-ID: <930265164@web.de> (raw)
Hi Michael,
I'm sure your assumption is not correct.
The application uses the maximum of 3 connections but every other application also accessing PostgreSQL needs at least one connection (e.g. pgAdmin,...), so you see >3 connections to the server.
It's also possible that there is an error in the code so not only the datasource you defined is used.
You might want to replace the driver with 8.4 Build 701. I'm using that driver myself with a max connection setting.
Testing it is very easy...just try to open more connections then possible. You will see that the application "hangs" if you try to open connection number 4.
--
Kind regards,
Juergen Ulbts
> -----Ursprüngliche Nachricht-----
> Von: "Michael Andreasen" <michael@dunlops.com>
> Gesendet: 26.09.09 15:35:28
> An: pgsql-jdbc@postgresql.org
> Betreff: Re: [JDBC] DataSource.setMaxConnections() - Does not work
Even though I set it at 3, if I look on the server I can see many
> more connections have been made?
>
> On Sat, Sep 26, 2009 at 2:25 PM, Michael Andreasen <michael@dunlops.
> com> wrote:
> Hi,
>
> Using version: 8.3-605.jdbc3
>
> DataSource.setMaxConnections() does not work.
>
> I create my datasource as such;
> dataSource = new PGPoolingDataSource();
> dataSource.setServerName("10.44.73.50");
> dataSource.setDatabaseName("ops");
> dataSource.setUser("postgres");
> dataSource.setPassword("postgres");
> dataSource.setMaxConnections(3);
>
> --
> Regards,
> Michael Andreasen
> Senior Analyst / Developer
>
> --
> Regards,
> Michael Andreasen
> Senior Analyst / Developer
>
>
________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: magog001@web.de
Subject: Re: DataSource.setMaxConnections() - Does not work
In-Reply-To: <930265164@web.de>
References: <930265164@web.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox