Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 21349633E78 for ; Mon, 17 Aug 2009 16:55:49 -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 64071-05 for ; Mon, 17 Aug 2009 19:55:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from n57.bullet.mail.sp1.yahoo.com (n57.bullet.mail.sp1.yahoo.com [98.136.44.49]) by mail.postgresql.org (Postfix) with SMTP id A7C97633D46 for ; Mon, 17 Aug 2009 16:55:43 -0300 (ADT) Received: from [216.252.122.219] by n57.bullet.mail.sp1.yahoo.com with NNFMP; 17 Aug 2009 19:55:41 -0000 Received: from [69.147.84.114] by t4.bullet.sp1.yahoo.com with NNFMP; 17 Aug 2009 19:55:41 -0000 Received: from [127.0.0.1] by omp203.mail.sp1.yahoo.com with NNFMP; 17 Aug 2009 19:55:41 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 339254.61709.bm@omp203.mail.sp1.yahoo.com Received: (qmail 60216 invoked by uid 60001); 17 Aug 2009 19:55:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1250538941; bh=m0WYgdQkuvpPvJYMm37wyoH3e9L6Pfd7Boubhsnq50E=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=uaRIXy5Z+rlmetDAEcdYWsjQmI4C38Xx+pl2Fr9FwoDXcLklHRKU0B+OtUGcsT7KXDM07AhPFLOgzRYpNpFoUpb7Mz0klbeyduwPyyHVZK3AQAfpUL+1Rz3M4OE8Ul49IdZFLOkXKzvsbBRBWXPamFIuc5cpLYzAvpOuqSyq8P0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=MUPyw2A53DNz6KiUJ2erG1vbcWhFIAgsPmIEe9bSdB8P8TkBNpyaVp925Qvan36staurmrDWHOlgHZ8r+xZ92Dt0FUvd5eSkqNJu7QmV/o98vo/ffUKFE0p/KusP+9es/BTD0j2Cw32MJ16imzc70c3c/ncxfgNB2wXlmJfuZSw=; Message-ID: <169596.59170.qm@web43141.mail.sp1.yahoo.com> X-YMail-OSG: 8z.1DngVM1leQIn08NJizxCNR3i7UjkdPgWD2SKtefgPj2AwXzEJLIXh Received: from [64.142.36.76] by web43141.mail.sp1.yahoo.com via HTTP; Mon, 17 Aug 2009 12:55:40 PDT X-Mailer: YahooMailRC/1358.27 YahooMailWebService/0.7.338.2 References: <400613.99933.qm@web43143.mail.sp1.yahoo.com> <4A897BD9.8010303@ttc-cmc.net> Date: Mon, 17 Aug 2009 12:55:40 -0700 (PDT) From: Michael Bell Subject: Re: JDBC broken connection against Postgres 8.4 To: dmp , pgsql-jdbc@postgresql.org In-Reply-To: <4A897BD9.8010303@ttc-cmc.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/26 X-Sequence-Number: 19875 I am not surprised. I strongly suspect this is an issue with Windows/PostgresSQL. OTOH, I did most of my testing against Postgres 8.4 server. ----- Original Message ---- From: dmp To: pgsql-jdbc@postgresql.org Cc: Michael Bell Sent: Monday, August 17, 2009 8:48:41 AM Subject: Re: [JDBC] JDBC broken connection against Postgres 8.4 > > >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 -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc