Re: connection timeout?

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Antonini Roberto <Roberto(dot)Antonini(at)tilab(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: connection timeout?
Date: 2004-12-03 20:50:56
Message-ID: 41B0D1B0.6040701@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Antonini Roberto wrote:

> * I disconnected network cable between PC and DB server

> The application remains blocked on
> DriverManager::getConnection

I'd expect this to eventually time out, but it might take several
minutes. It depends on your TCP stack.

> Is it a timeout issue?

Yes.

> If so, how can I set this timeout?

Currently you can't, mostly because it hasn't been a big enough issue
for anyone to step forward and implement.

When implemented I'd expect it would be set via a URL parameter.

The Java socket primitives makes it quite hard to do timeouts on connect
anyway. Either you have to use NIO (doesn't exist until 1.4, would be an
invasive change) or Socket.connect() (doesn't exist until 1.4). So
you're out of luck under 1.3, and the driver will have to do conditional
compilation to use 1.4-specific code as it needs to build under 1.3.

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Chris White (cjwhite) 2004-12-04 15:26:15 Use of bytea
Previous Message Oliver Jowett 2004-12-03 20:40:34 Re: Bug in setFetchSize