Re: Connection attempt hangs when server is unresponsive

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Woody Woodring <george(dot)woodring(at)iglass(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection attempt hangs when server is unresponsive
Date: 2007-12-05 22:33:33
Message-ID: 4757273D.3090307@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Woody Woodring wrote:

> Since createDataSource is synchronized we traced them to the following
> thread that had them blocked:
>
> at java.net.PlainSocketImpl.socketConnect(Native Method)

That's an OS-level method, if it blocks and you have not set
loginTimeout there is not much the driver can do.

Maybe you should set loginTimeout? (It is more expensive as it spawns
extra threads to deal with timeouts in this sort of case, though)

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Henry B. Hotz 2007-12-06 02:59:47 Re: JDBC and GSSAPI/Krb5
Previous Message Kris Jurka 2007-12-05 22:31:39 Re: JDBC XA Support and Sample code?