Skip site navigation (1) Skip section navigation (2)

Establishing remote connections is slow

From: Mindaugas Žakšauskas <mindas(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Establishing remote connections is slow
Date: 2012-01-17 12:44:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin

I have a very weird problem related to establishing remote connections
to PostgreSQL server and hopefully someone can give me some hints how
can I debug this.

The essence is that establishing remote connection takes anywhere from
10 to 30 seconds. Once connected, the queries are fast - it's just
establishing new connection that takes ages. This problem is not
applicable to establishing local connections: running psql command
from the local machine takes no time to connect, same applies if a
client connects to the PostgreSQL via ssh tunnel.

Immediately after restarting PostgreSQL daemon, the problem
temporarily goes away but later resurfaces again.

Things we have tried:
- doing all sorts of DNS queries against the connecting client IP --
seems to be fine, DNS resolution takes no time;

- enabling debug for HA
-- debugging showed no problems. We were probing for the problem
described in by

- asking PostgreSQL to listen not only on multipath IP (used for
failover), but also on an ethernet interface. This is the most
interesting. When remote connection via multipath IP is slow to
establish, establishing remote connections via ethernet interface is
still snappy.

At this point it is reasonable to think that the problem lies
somewhere in the networking (multipath IP), and that well might be
true. But we tried running simple netcat server-client and it was all
instant via both interfaces (multipath and eth).

Can anyone suggest any ideas how to debug this further? Many thanks in advance.

- Solaris 5.10 / Intel
- Sun cluster
- HA for PostgreSQL
- PostgreSQL server version: 9.0.4



pgsql-admin by date

Next:From: Tom LaneDate: 2012-01-17 15:09:42
Subject: Re: Establishing remote connections is slow
Previous:From: Fujii MasaoDate: 2012-01-17 03:44:09
Subject: Re: PG synchronous replication and unresponsive slave

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group