Re: Slow connection once the PC is network connected

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Yan Cheng CHEOK <yccheok(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Slow connection once the PC is network connected
Date: 2010-10-26 10:01:39
Message-ID: A71C2D25-8C1D-4811-A6D8-1785D5C4295A@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 26 Oct 2010, at 11:39, Yan Cheng CHEOK wrote:

> Hello, I am deploying a database to customer PC, which will be only connected by local application.
>
> However, I realize once the PC is network connected, the connection take extremely long time (around 10 seconds)

That sounds suspiciously like the default timeout for DNS lookups.
What platform is this? Windows?
Is that machine able to look up localhost?

> May I know why this happen? I was wondering whether is there any workaround to overcome this?
>
> I connect the database using C++ code
>
> PQconnectdb("dbname = ProductionFactory user = postgres password = password");

Does it help any to add hostaddr = 127.0.0.1 to that string?

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.

!DSPAM:737,4cc6a70710292409920920!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-10-26 13:40:05 Re: rule which unpredictable modify a sequence number
Previous Message Pavel Stehule 2010-10-26 09:59:43 Re: Slow connection once the PC is network connected