Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id BE0E92E2EEF for ; Wed, 5 Dec 2007 18:33:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 98363-05 for ; Wed, 5 Dec 2007 18:33:24 -0400 (AST) Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id 896AD2E0308 for ; Wed, 5 Dec 2007 18:33:33 -0400 (AST) Received: from 122-57-33-135.jetstream.xtra.co.nz ([122.57.33.135] helo=[192.168.1.2]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1J02o5-0005xA-99; Thu, 06 Dec 2007 11:33:29 +1300 Message-ID: <4757273D.3090307@opencloud.com> Date: Thu, 06 Dec 2007 11:33:33 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Woody Woodring CC: pgsql-jdbc@postgresql.org Subject: Re: Connection attempt hangs when server is unresponsive References: <086f01c83775$42d5d370$80b1a8c0@istructure.com> In-Reply-To: <086f01c83775$42d5d370$80b1a8c0@istructure.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/34 X-Sequence-Number: 17889 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