Unix Technical Forum

(Win32 Postgres) Slow to Connect first - OK afterwards

This is a discussion on (Win32 Postgres) Slow to Connect first - OK afterwards within the Pgsql General forums, part of the PostgreSQL category; --> I am running PostgreSQL 8.0 on WinXP When I try to connect psql.exe" -h localhost -p 5432 template1 "postgres" ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 04:59 AM
Scott cox
 
Posts: n/a
Default (Win32 Postgres) Slow to Connect first - OK afterwards

I am running PostgreSQL 8.0 on WinXP
When I try to connect

psql.exe" -h localhost -p 5432 template1 "postgres"

I have to wait
30 seconds before the Password: Prompt arrives
30 seconds after the password is entered.
Once I am connected access is fast. I figured the problem is Authentication.

a.) I tried the following (pg_hba.conf) with no success/difference
# TYPE DATABASE USER CIDR-ADDRESS METHOD
#host all all 127.0.0.1/32 trust
#local all all trust
## IPv4 local connections:
#host all all 127.0.0.1/32 md5

b.) Installed QoS as suggested in a post in this list. No success

I am only using TCP/IP on localhost (127.0.0.1) - I am open to
suggestions and any recommendation of tools that would let me
figure out what is happening.

TIA
-Scott



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 04:59 AM
Martijn van Oosterhout
 
Posts: n/a
Default Re: (Win32 Postgres) Slow to Connect first - OK afterwards

On UNIX this generally suggests a DNS configuration problem (can't
lookup 127.0.0.1 in DNS).

That's all I can help you with here...

Hope this helps,

On Fri, Jul 15, 2005 at 03:08:24PM +0000, Scott cox wrote:
> I am running PostgreSQL 8.0 on WinXP
> When I try to connect
>
> psql.exe" -h localhost -p 5432 template1 "postgres"
>
> I have to wait
> 30 seconds before the Password: Prompt arrives
> 30 seconds after the password is entered.
> Once I am connected access is fast. I figured the problem is Authentication.
>
> a.) I tried the following (pg_hba.conf) with no success/difference
> # TYPE DATABASE USER CIDR-ADDRESS METHOD
> #host all all 127.0.0.1/32 trust
> #local all all trust
> ## IPv4 local connections:
> #host all all 127.0.0.1/32 md5
>
> b.) Installed QoS as suggested in a post in this list. No success
>
> I am only using TCP/IP on localhost (127.0.0.1) - I am open to
> suggestions and any recommendation of tools that would let me
> figure out what is happening.


--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFC2nDgIB7bNG8LQkwRAi1HAJkBwgAYwltedV3/DXVumhnSdMVE9ACeP2DM
wWi/lt1r4wRLa6H1rQgtF84=
=tyz1
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-09-2008, 04:59 AM
Tom Lane
 
Posts: n/a
Default Re: (Win32 Postgres) Slow to Connect first - OK afterwards

"Scott cox" <sadcox66@hotmail.com> writes:
> I am running PostgreSQL 8.0 on WinXP
> When I try to connect


> psql.exe" -h localhost -p 5432 template1 "postgres"


> I have to wait
> 30 seconds before the Password: Prompt arrives
> 30 seconds after the password is entered.
> Once I am connected access is fast. I figured the problem is Authentication.


Actually, I bet the problem is a broken DNS setup, causing psql to spend
30 seconds trying to resolve the hostname "localhost" before it gives up
and resorts to a different way of resolving the hostname. Check your
DNS configuration --- for instance, are you pointing to a name server
that actually works?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-09-2008, 05:00 AM
Andrus
 
Posts: n/a
Default Re: (Win32 Postgres) Slow to Connect first - OK afterwards

Use 127.0.0.1 instead of localhost

In this case DNS is not used.

Andrus.


""Scott cox"" <sadcox66@hotmail.com> wrote in message
news:BAY19-F8EAC399090BB16BFA5ADFCDD00@phx.gbl...
>I am running PostgreSQL 8.0 on WinXP
> When I try to connect
>
> psql.exe" -h localhost -p 5432 template1 "postgres"
>
> I have to wait
> 30 seconds before the Password: Prompt arrives
> 30 seconds after the password is entered.
> Once I am connected access is fast. I figured the problem is
> Authentication.
>
> a.) I tried the following (pg_hba.conf) with no success/difference
> # TYPE DATABASE USER CIDR-ADDRESS METHOD
> #host all all 127.0.0.1/32 trust
> #local all all trust
> ## IPv4 local connections:
> #host all all 127.0.0.1/32 md5
>
> b.) Installed QoS as suggested in a post in this list. No success
>
> I am only using TCP/IP on localhost (127.0.0.1) - I am open to
> suggestions and any recommendation of tools that would let me
> figure out what is happening.
>
> TIA
> -Scott
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-09-2008, 05:00 AM
Scott cox
 
Posts: n/a
Default Re: (Win32 Postgres) Slow to Connect first - OK afterwards

Andrus, Is correct. There is no DNS involved because I am using 127.0.0.1 in
my config
and when connecting. But there is still a ~60second delay connecting and
more delays
to return the select * query.

I have other servers using 127.0.0.1 like Apache,MySql and none have this
delay connecting and working so I am sure it is Postmaster related.

Any suggestions on different configurations that I can try, pgSql is
unusable to me
if I cannot solve this issue and I need it pretty quick now.
TIA
Scott




>From: "Andrus" <eetasoft@online.ee>
>To: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] (Win32 Postgres) Slow to Connect first - OK
>afterwards
>Date: Mon, 18 Jul 2005 14:56:00 +0300
>
>Use 127.0.0.1 instead of localhost
>
>In this case DNS is not used.
>
>Andrus.
>
>
>""Scott cox"" <sadcox66@hotmail.com> wrote in message
>news:BAY19-F8EAC399090BB16BFA5ADFCDD00@phx.gbl...
> >I am running PostgreSQL 8.0 on WinXP
> > When I try to connect
> >
> > psql.exe" -h localhost -p 5432 template1 "postgres"
> >
> > I have to wait
> > 30 seconds before the Password: Prompt arrives
> > 30 seconds after the password is entered.
> > Once I am connected access is fast. I figured the problem is
> > Authentication.
> >
> > a.) I tried the following (pg_hba.conf) with no success/difference
> > # TYPE DATABASE USER CIDR-ADDRESS METHOD
> > #host all all 127.0.0.1/32 trust
> > #local all all trust
> > ## IPv4 local connections:
> > #host all all 127.0.0.1/32 md5
> >
> > b.) Installed QoS as suggested in a post in this list. No success
> >
> > I am only using TCP/IP on localhost (127.0.0.1) - I am open to
> > suggestions and any recommendation of tools that would let me
> > figure out what is happening.
> >
> > TIA
> > -Scott




---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com