Re: Randomly slow queries over TCP, but not on localhost

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Ramiro Barreca <rbarreca(at)gmail(dot)com>
Cc: Scott Whitney <scott(at)journyx(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Randomly slow queries over TCP, but not on localhost
Date: 2015-10-07 13:08:29
Message-ID: CAOR=d=1D0wD6-ZEG9oetfnn3Vv_oRJo_3BM0OXhUR9Oza6TLGw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Oct 7, 2015 at 5:18 AM, Ramiro Barreca <rbarreca(at)gmail(dot)com> wrote:
> I don't think is this case.
> We test this by using the IP address, not the hostname.
>
> What we can see is the extremely low speed of connection in 2 of 10 cases,
> when using a psql at command line with a simple "select 1 from...." inside a
> loop of a shell script FROM THE PG SERVER!!!
>
> If we do the same, but using a pipe connection (no IP address), there is no
> delay.
>

OK from your host, do:

ping clientmachinename

where clientmachinename is the name of your client, then using the IP
you get from that type

host 10.0.0.1

replaceing 10.0.0.1 with the IP you got from the ping command. If that
takes several seconds, you've got a reverse lookup problem.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ankur Kaushik 2015-10-07 21:15:07 Use of PgBouncer
Previous Message Ramiro Barreca 2015-10-07 11:18:15 Re: Randomly slow queries over TCP, but not on localhost