Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TOnmn-0004IT-Qv for pgsql-jdbc@postgresql.org; Thu, 18 Oct 2012 10:57:09 +0000 Received: from news.hub.org ([200.46.204.72]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TOnmi-0006tr-S9 for pgsql-jdbc@postgresql.org; Thu, 18 Oct 2012 10:57:09 +0000 Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.5/8.14.5) with ESMTP id q9IAv2YW052828 for ; Thu, 18 Oct 2012 07:57:02 -0300 (ADT) (envelope-from news@news.hub.org) Received: from news.hub.org (news@localhost) by news.hub.org (8.14.5/8.14.5/Submit) with NNTP id q9IAkYr3045831 for pgsql-jdbc@postgresql.org; Thu, 18 Oct 2012 07:46:34 -0300 (ADT) (envelope-from news) Received: by 10.224.31.20 with SMTP id w20mr13240413qac.2.1350557193585; Thu, 18 Oct 2012 03:46:33 -0700 (PDT) Received: by 10.52.66.235 with SMTP id i11mr3485502vdt.7.1350557193519; Thu, 18 Oct 2012 03:46:33 -0700 (PDT) X-Newsgroups: pgsql.interfaces.jdbc Date: Thu, 18 Oct 2012 03:46:33 -0700 (PDT) In-Reply-To: <51061EFB789B4A45AC6598C83649B7BE8DB56604@NBL-EXCD1-01.nebula.local> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=170.66.1.232; posting-account=tXQTTAoAAABSQON-pQgHxc6VqzzjB30Y References: , <507FC5EA.6070905@ringerc.id.au> <51061EFB789B4A45AC6598C83649B7BE8DB56604@NBL-EXCD1-01.nebula.local> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Severe performance degradation when using the 9.2-1000 JDBC 4 driver From: =?ISO-8859-1?Q?S=E9rgio_Saquetim?= Cc: Rafael dos Santos Silva Injection-Date: Thu, 18 Oct 2012 10:46:33 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable To: pgsql-jdbc@postgresql.org X-Pg-Spam-Score: -1.4 (-) X-Archive-Number: 201210/83 X-Sequence-Number: 23407 Mikko, Thanks for the support, adding a DNS to the server's IP address in my hosts= file solved it, but I'm curious, since I was directly using my server's IP= address in the connection string, there shouldn't be any DNS requests at a= ll. What am I missing? About your suggestions I agree with Dave Cramer, although using Java 7 it's= not a problem for me. The best solution would be number 1. Thanks again. Em quinta-feira, 18 de outubro de 2012 06h17min30s UTC-3, Mikko Tiihonen e= screveu: > I think the DNS lookup is part of the JDBC failover connection patch that= I created. >=20 > I initially used a InetSocketAddress.getHostString() that does not do any= DNS lookups, but since that method was added in Java7 I had to revert to g= etHostName() method which does. >=20 >=20 >=20 > I see following options: >=20 > 1) modify the code so that is uses reflection and if Java7 is detected it= will use the no-lookup method >=20 > 2) wait 4 months until Oracle drops Java6 support (Java6 was supposed to = be EOL already few months back) and use the no-lookup variant >=20 > 3) let the code stay as is and let users fix their dns servers >=20 >=20 >=20 > -Mikko >=20 > ________________________________________ >=20 > From: pgsql-jdbc-owner@postgresql.org [pgsql-jdbc-owner@postgresql.org] o= n behalf of Craig Ringer [ringerc@ringerc.id.au] >=20 > Sent: 18 October 2012 12:03 >=20 > To: S=EF=BF=BDrgio Saquetim >=20 > Cc: pgsql-jdbc@postgresql.org; Rafael dos Santos Silva >=20 > Subject: Re: [JDBC] Severe performance degradation when using the 9.2-100= 0 JDBC 4 driver >=20 >=20 >=20 > On 10/18/2012 12:16 PM, S=EF=BF=BDrgio Saquetim wrote: >=20 > > I can confirm the problem, it's taking about 4000ms to get a Connection= . >=20 >=20 >=20 > That sounds like a broken DNS or reverse DNS setup in your environment, >=20 > it's about right for your average DNS timeout. >=20 >=20 >=20 > -- >=20 > Craig Ringer >=20 >=20 >=20 >=20 >=20 > -- >=20 > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) >=20 > To make changes to your subscription: >=20 > http://www.postgresql.org/mailpref/pgsql-jdbc >=20 >=20 >=20 >=20 >=20 > --=20 >=20 > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) >=20 > To make changes to your subscription: >=20 > http://www.postgresql.org/mailpref/pgsql-jdbc