Re: JDBC broken connection against Postgres 8.4

Поиск
Список
Период
Сортировка
Искать
От
Michael Bell
Тема
Re: JDBC broken connection against Postgres 8.4
Дата
Msg-id
169596.59170.qm@web43141.mail.sp1.yahoo.com
Ответ на
Список
Дерево обсуждения
JDBC broken connection against Postgres 8.4 Michael Bell <mikebell90@yahoo.com>
Re: JDBC broken connection against Postgres 8.4 Віталій Тимчишин <tivv00@gmail.com>
Re: JDBC broken connection against Postgres 8.4 Michael Bell <mikebell90@yahoo.com>
Re: JDBC broken connection against Postgres 8.4 dmp <danap@ttc-cmc.net>
Re: JDBC broken connection against Postgres 8.4 Michael Bell <mikebell90@yahoo.com>
Re: JDBC broken connection against Postgres 8.4 jerome moliere <jerome.moliere@gmail.com>
Re: JDBC broken connection against Postgres 8.4 Michael Bell <mikebell90@yahoo.com>
Re: JDBC broken connection against Postgres 8.4 dmp <danap@ttc-cmc.net>
Re: JDBC broken connection against Postgres 8.4 Michael Bell <mikebell90@yahoo.com>
Re: JDBC broken connection against Postgres 8.4 dmp <danap@ttc-cmc.net>
Re: JDBC broken connection against Postgres 8.4 Michael Bell <mikebell90@yahoo.com>
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



      

В списке pgsql-jdbc по дате отправления
От: dmp
Дата:
Сообщение: Re: JDBC connection query..
От: Tom Lane
Дата:
Сообщение: Can't build 8.4-701 on Fedora
FAQ