pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sérgio Saquetim <sergiosaquetim@gmail.com>
To: pgsql-jdbc@postgresql.org
Cc: Rafael dos Santos Silva <xfalcox@gmail.com>
Subject: Re: Severe performance degradation when using the 9.2-1000 JDBC 4 driver
Date: Thu, 18 Oct 2012 03:46:33 -0700 (PDT)
Message-ID: <aa8bb16f-7afd-4b15-9d6a-3d648801996c@googlegroups.com> (raw)
In-Reply-To: <51061EFB789B4A45AC6598C83649B7BE8DB56604@NBL-EXCD1-01.nebula.local>
References: <CACLs3uCrjXaY94ivGQgoXDfe-2dwxwsHdPXrA3ey+eL7TPQEJA@mail.gmail.com>
	<d2b756c0-cb16-4a4b-a893-33042a2d28a9@googlegroups.com>
	<507FC5EA.6070905@ringerc.id.au>
	<51061EFB789B4A45AC6598C83649B7BE8DB56604@NBL-EXCD1-01.nebula.local>

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 all. 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  escreveu:
> I think the DNS lookup is part of the JDBC failover connection patch that I created.
> 
> 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 getHostName() method which does.
> 
> 
> 
> I see following options:
> 
> 1) modify the code so that is uses reflection and if Java7 is detected it will use the no-lookup method
> 
> 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
> 
> 3) let the code stay as is and let users fix their dns servers
> 
> 
> 
> -Mikko
> 
> ________________________________________
> 
> From: pgsql-jdbc-owner@postgresql.org [pgsql-jdbc-owner@postgresql.org] on behalf of Craig Ringer [ringerc@ringerc.id.au]
> 
> Sent: 18 October 2012 12:03
> 
> To: S�rgio Saquetim
> 
> Cc: pgsql-jdbc@postgresql.org; Rafael dos Santos Silva
> 
> Subject: Re: [JDBC] Severe performance degradation when using the 9.2-1000 JDBC 4 driver
> 
> 
> 
> On 10/18/2012 12:16 PM, S�rgio Saquetim wrote:
> 
> > I can confirm the problem, it's taking about 4000ms to get a Connection.
> 
> 
> 
> That sounds like a broken DNS or reverse DNS setup in your environment,
> 
> it's about right for your average DNS timeout.
> 
> 
> 
> --
> 
> Craig Ringer
> 
> 
> 
> 
> 
> --
> 
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> 
> To make changes to your subscription:
> 
> http://www.postgresql.org/mailpref/pgsql-jdbc
> 
> 
> 
> 
> 
> -- 
> 
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> 
> To make changes to your subscription:
> 
> http://www.postgresql.org/mailpref/pgsql-jdbc





view thread (25+ messages)  latest in thread

Message-ID: <aa8bb16f-7afd-4b15-9d6a-3d648801996c@googlegroups.com>
Permalink:  ../aa8bb16f-7afd-4b15-9d6a-3d648801996c@googlegroups.com/
Also on:    postgresql.org/message-id/aa8bb16f-7afd-4b15-9d6a-3d648801996c@googlegroups.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: sergiosaquetim@gmail.com, xfalcox@gmail.com
  Subject: Re: Severe performance degradation when using the 9.2-1000 JDBC 4 driver
  In-Reply-To: <aa8bb16f-7afd-4b15-9d6a-3d648801996c@googlegroups.com>
  References: <CACLs3uCrjXaY94ivGQgoXDfe-2dwxwsHdPXrA3ey+eL7TPQEJA@mail.gmail.com> <d2b756c0-cb16-4a4b-a893-33042a2d28a9@googlegroups.com> <507FC5EA.6070905@ringerc.id.au> <51061EFB789B4A45AC6598C83649B7BE8DB56604@NBL-EXCD1-01.nebula.local> <aa8bb16f-7afd-4b15-9d6a-3d648801996c@googlegroups.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox