Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a9i58-00085k-2z for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Dec 2015 23:35:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a9i56-0006Lv-VU for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Dec 2015 23:35:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a9fwG-0007fW-8q for pgsql-bugs@postgresql.org; Thu, 17 Dec 2015 21:18:16 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1a9fw9-0004gw-MK for pgsql-bugs@postgresql.org; Thu, 17 Dec 2015 21:18:12 +0000 MIME-Version: 1.0 Subject: BUG #13825: JDBC Driver Connection Pool Issue To: pgsql-bugs@postgresql.org From: mayan.murad@kronos.com Date: Thu, 17 Dec 2015 21:17:07 +0000 Message-ID: <20151217211707.3356.32260@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13825 Logged by: Mayan Murad Email address: mayan.murad@kronos.com PostgreSQL version: 9.4.1 Operating system: RHEL Description: I have an environment where a Tomcat Application server is configured for a Tomcat JDBC connection pool that uses the PostgreSQL JDBC driver, specifically, postgresql-9.4-1206-jdbc42.jar. My JDBC connection information is as follows: Notice that I have 3 nodes and that I want the initial number of pooled connections to be 10. After starting up Tomcat, I check pg_stat_activity to see my connections that were established to the Master node. To my surprise, I saw 30 connections! I then reduced the number of nodes in my JDBC URL and I still saw 30 connections, even with just one node in the JDBC URL. Next, I reduced the value for initialSize and the pattern remained consistent. I would always see 3 times the number of connections specified in initialSize. I have a 3 node cluster as well, so I'm not sure if is somehow getting the multiple from there. We are going to have several Application Servers and don't want to incur cost of creating connection to the database as users request them, so we will definitely have some connection made at startup using the initialSize parameter. This could dramatically increase the number of connections made to the database. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs