Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0031A634723 for ; Mon, 17 Aug 2009 12:59:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 74365-03 for ; Mon, 17 Aug 2009 15:58:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound.vnet-inc.com (outbound.vnet-inc.com [216.146.104.103]) by mail.postgresql.org (Postfix) with ESMTP id 38D4B6326BE for ; Mon, 17 Aug 2009 12:58:56 -0300 (ADT) Received: from [192.168.157.32] (unknown [216.129.226.19]) by outbound.vnet-inc.com (Postfix) with ESMTP id E54C45C7A; Mon, 17 Aug 2009 09:58:53 -0600 (MDT) Message-ID: <4A897BD9.8010303@ttc-cmc.net> Date: Mon, 17 Aug 2009 09:48:41 -0600 From: dmp User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org CC: Michael Bell Subject: Re: JDBC broken connection against Postgres 8.4 References: <400613.99933.qm@web43143.mail.sp1.yahoo.com> In-Reply-To: <400613.99933.qm@web43143.mail.sp1.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/23 X-Sequence-Number: 19872 > > >As you see below, something seems....whacked. A simple loop with an unpooled connection (code provided below) often gives an exception when connecting. The Thread.sleep statement has been made as high as 5000 ms, and exceptions still sporadically occur. > >I don't know if this is a JDBC driver issue or core server issue. Or something here. But the code is so simple.... > > >Single box test (client, server on same machine, accessing 127.0.0.1) >Postgesql 8.4.01 >JDBC3 8.4.701 (also tried 8.3.603) >Sun JDK 1.5_16 >Windows XP SP3, 2GB RAM, 64MB-1GB heap > >Code to reproduce: > > public static void main(String[] args) throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException, InterruptedException { > > Connection con=null; > Class.forName("org.postgresql.Driver").newInstance(); > int count=0; > while (count < 250) { > try { > System.out.println(count); > con= DriverManager.getConnection("jdbc:postgresql://localhost/retain","mjb","turnip"); > } finally { > if (con != null) con.close(); > } > Thread.sleep(2); > count++; > } > } > I'm unable to reproduce the exception on a common client with the two PostgreSQL 8.3.x database configurations, one local the other on the network, listed below. All linux configurations Client: java version "1.5.0_12" jdbc version: "postgresql-8.3-603" Database Hosts: Host: 127.0.0.1 -- Generated On: 2009.08.17 AD at 09:24:16 MDT -- SQL version: PostgreSQL 8.3.3 -- Database: world -- Host: cindy.dandymadeproductions.net -- Generated On: 2009.08.17 AD at 09:10:41 MDT -- SQL version: PostgreSQL 8.3.0 -- Database: world danap