pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedSlow Remote connection
4+ messages / 2 participants
[nested] [flat]
* Slow Remote connection
@ 2002-06-24 14:26 Jean-Arthur Silve <jeanarthur@eurovox.fr>
0 siblings, 2 replies; 4+ messages in thread
From: Jean-Arthur Silve @ 2002-06-24 14:26 UTC (permalink / raw)
To: pgsql-admin
Hi !
I have a httpd server on one server, and PostgresQL 7.2 on a second server
(P4 1.7 Ghz / Linux ) on a local network.
When there are about 20 (and more ) connection on the DB, the remote
connecxtion to the DB from the web server is very long (about 5-10 sec)
before have the prompt.
On the local machine, it's near immediate.
I use IP authentification (no username/password).
Local network seems ok (I can connect to web sites etc..fast !)
Any clue ??
Thank you for your help !
jean-arthur
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Slow Remote connection
@ 2002-06-24 22:55 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jean-Arthur Silve <jeanarthur@eurovox.fr>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2002-06-24 22:55 UTC (permalink / raw)
To: Jean-Arthur Silve <jeanarthur@eurovox.fr>; +Cc: pgsql-admin
Jean-Arthur Silve <jeanarthur@eurovox.fr> writes:
> I have a httpd server on one server, and PostgresQL 7.2 on a second server
> (P4 1.7 Ghz / Linux ) on a local network.
> When there are about 20 (and more ) connection on the DB, the remote
> connecxtion to the DB from the web server is very long (about 5-10 sec)
> before have the prompt.
> On the local machine, it's near immediate.
Weird. Perhaps something wrong with your DNS setup, causing it to take
a long time to resolve the name of the other machine? Anyway I'd
suspect that the problem is not within Postgres proper, given that
you're not seeing a performance problem with local connections.
Another thing you might try just to obtain more data is to test local
connections that use TCP rather than Unix-socket transport, eg
psql -h 127.0.0.1
> I use IP authentification (no username/password).
You mean "trust"? Please describe your pg_hba contents *exactly*;
this might be a relevant difference ...
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Slow Remote connection
@ 2002-07-01 12:41 Jean-Arthur Silve <jeanarthur@eurovox.fr>
parent: Jean-Arthur Silve <jeanarthur@eurovox.fr>
1 sibling, 1 reply; 4+ messages in thread
From: Jean-Arthur Silve @ 2002-07-01 12:41 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Well...
I tried to connect with psql -h 127.0.0.1 mydb and it's slow (+/- 5 sec.)
and psql mydb is fast ( less than 1 sec.) !
Here is my pg_hba :
.. few comments...
local all trust
host all 127.0.0.1 255.255.255.255 trust
host all my_ip 255.255.255.255 trust
where my_ip is an IP address
May be I have a probleme with my system ?
version of the kernel is 2.4
jean-arthur
At 18:55 24/06/02 -0400, Tom Lane wrote:
>Jean-Arthur Silve <jeanarthur@eurovox.fr> writes:
> > I have a httpd server on one server, and PostgresQL 7.2 on a second server
> > (P4 1.7 Ghz / Linux ) on a local network.
>
> > When there are about 20 (and more ) connection on the DB, the remote
> > connecxtion to the DB from the web server is very long (about 5-10 sec)
> > before have the prompt.
>
> > On the local machine, it's near immediate.
>
>Weird. Perhaps something wrong with your DNS setup, causing it to take
>a long time to resolve the name of the other machine? Anyway I'd
>suspect that the problem is not within Postgres proper, given that
>you're not seeing a performance problem with local connections.
>
>Another thing you might try just to obtain more data is to test local
>connections that use TCP rather than Unix-socket transport, eg
> psql -h 127.0.0.1
>
> > I use IP authentification (no username/password).
>
>You mean "trust"? Please describe your pg_hba contents *exactly*;
>this might be a relevant difference ...
>
> regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Slow Remote connection
@ 2002-07-01 15:19 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jean-Arthur Silve <jeanarthur@eurovox.fr>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2002-07-01 15:19 UTC (permalink / raw)
To: Jean-Arthur Silve <jeanarthur@eurovox.fr>; +Cc: pgsql-admin
Jean-Arthur Silve <jeanarthur@eurovox.fr> writes:
> I tried to connect with psql -h 127.0.0.1 mydb and it's slow (+/- 5 sec.)
> and psql mydb is fast ( less than 1 sec.) !
> Here is my pg_hba :
> local all trust
> host all 127.0.0.1 255.255.255.255 trust
> host all my_ip 255.255.255.255 trust
Weird. You're using trust in both cases, so there's no reason for
authentication to make any difference.
The only thing I can think of is that something is wrong with DNS name
resolution. Do you have hostname_lookup enabled in postgresql.conf?
Does changing it to the other setting make any difference? (Don't
forget to SIGHUP the postmaster after changing postgresql.conf, else
it won't notice.)
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-07-01 15:19 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-24 14:26 Slow Remote connection Jean-Arthur Silve <jeanarthur@eurovox.fr>
2002-06-24 22:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-07-01 12:41 ` Jean-Arthur Silve <jeanarthur@eurovox.fr>
2002-07-01 15:19 ` Tom Lane <tgl@sss.pgh.pa.us>
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