Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 66204632668 for ; Sun, 27 Sep 2009 07:39:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98598-02 for ; Sun, 27 Sep 2009 10:39:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fmmailgate04.web.de (fmmailgate04.web.de [217.72.192.242]) by mail.postgresql.org (Postfix) with ESMTP id 4B9DB6325BB for ; Sun, 27 Sep 2009 07:39:08 -0300 (ADT) Received: from web.de by fmmailgate04.web.de (Postfix) with SMTP id 4251961BD741 for ; Sun, 27 Sep 2009 12:39:05 +0200 (CEST) Received: from [84.132.67.195] by freemailng1602.web.de with HTTP; Sun, 27 Sep 2009 12:39:03 +0200 Date: Sun, 27 Sep 2009 12:39:03 +0200 Message-Id: <930265164@web.de> MIME-Version: 1.0 From: "J. W. Ulbts" To: pgsql-jdbc@postgresql.org Subject: Re: DataSource.setMaxConnections() - Does not work Precedence: fm-user Organization: http://freemail.web.de/ X-Provags-Id: V01U2FsdGVkX1+taspGYXLt3S0zO02uw215DTVQiWnMFAOSt+McQiOZkNgFM VRH1FAywblInuN5Cm5f1iO3c3N0eaAAqtmlEK0Wm7PpNyOXmsE= Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.203 tagged_above=-10 required=5 tests=BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396 X-Spam-Level: X-Archive-Number: 200909/52 X-Sequence-Number: 19999 Hi Michael, I'm sure your assumption is not correct. The application uses the maximum of 3 connections but every other applicat= ion 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 data= source you defined is used. You might want to replace the driver with 8.4 Build 701. I'm using that dr= iver 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 n= umber 4. -- Kind regards, Juergen Ulbts > -----Urspr=FCngliche Nachricht----- > Von: "Michael Andreasen" > 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=20 > more connections have been made=3F >=20 > On Sat, Sep 26, 2009 at 2:25 PM, Michael Andreasen com> wrote: > Hi, >=20 > Using version: 8.3-605.jdbc3 >=20 > DataSource.setMaxConnections() does not work. >=20 > I create my datasource as such; > dataSource =3D new PGPoolingDataSource(); > dataSource.setServerName("10.44.73.50"); > dataSource.setDatabaseName("ops"); > dataSource.setUser("postgres"); > dataSource.setPassword("postgres"); > dataSource.setMaxConnections(3); >=20 > --=20 > Regards, > Michael Andreasen > Senior Analyst / Developer >=20 > --=20 > Regards, > Michael Andreasen > Senior Analyst / Developer >=20 >=20 =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate f=FCr nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/