Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 03BFD632CB4 for ; Tue, 5 Jan 2010 23:50:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 52627-09 for ; Wed, 6 Jan 2010 03:49:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mail.postgresql.org (Postfix) with ESMTP id 2600C63271E for ; Tue, 5 Jan 2010 23:49:48 -0400 (AST) Received: by pwi15 with SMTP id 15so11703449pwi.3 for ; Tue, 05 Jan 2010 19:49:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=GlzPO7CjuJhznK3Ns5oehQIbbDqMd06KrN/msLJWhwE=; b=VB5otKLxqjQCDlMS5zUpoWU+ZZAIn6EzpokcIam/KwpF7RaCiGaWECmetiiXHRkGuT nMSLSu0yQ0m9jmhIwOX10nBefj59KwGVbdsbOWV6+bxPYlhhBQ9Hdn9uy6jSdTUf2bO6 S3rxuehRc7VdzxiLOM6IsysiTlqhhLhpnUvp4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=sW3PkphU7bz5oXqK2fng0OY0fZGj6YVxjwhAqY0LCA3Cz3XywHXBCUoJ74Gn8nihJI PDsLPTj0i3VAwAWzcVrA4UiylaIgp3Qy/sBwfWeEUZkzuvw2js20xBAabrbeTDNN/p8P NpO+NSJDwtZnefi/kkb79h9NGUNvnk7229RRI= MIME-Version: 1.0 Received: by 10.115.144.12 with SMTP id w12mr16302185wan.32.1262749787078; Tue, 05 Jan 2010 19:49:47 -0800 (PST) In-Reply-To: <28249.1262668449@sss.pgh.pa.us> References: <28249.1262668449@sss.pgh.pa.us> From: Dmitri Girski Date: Wed, 6 Jan 2010 14:49:27 +1100 X-Google-Sender-Auth: 63409b1728665ad3 Message-ID: Subject: Re: pg_connect takes 3.0 seconds To: Tom Lane Cc: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=0016367b6bb47fc6af047c76d833 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.59 tagged_above=-10 required=5 tests=BAYES_00=-2.599, FH_DATE_PAST_20XX=3.188, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201001/55 X-Sequence-Number: 36935 --0016367b6bb47fc6af047c76d833 Content-Type: text/plain; charset=ISO-8859-1 Hi Tom, The timing is around 3.0 seconds Time=3.0037 Time=3.4038 Time=3.0038 Time=3.004 Time=3.2037 Time=3.0039 Time=3.0034 Time=3.0034 Time=3.2039 Time=3.0044 Time=3.8044 Time=3.2034 I don't think that it could relate to DNS problem as I tried 2 methods which does not use name resolution ( hosts file & ip address) I will definitely seek the help from network geeks and I will check all TCP stack settings. Thank you! Cheers, Dmitri. On Tue, Jan 5, 2010 at 4:14 PM, Tom Lane wrote: > Dmitri Girski writes: > > I am running a PostgreSQL server 8.3.5 with a pretty much standard > config. > > > The web application server which runs Apache 1.3/PHP2.9 has an > intermittent > > problem: > > pg_connect takes exactly 3.0 seconds. The usual connection time is > 0.0045. > > The long request happens at approximate rate 1:100. > > Sounds a lot like a dropped-packets problem. The exact timing would be > explained if that is the retransmit timeout in your client-side TCP > stack. If that's what it is, you need some network engineers, not us > database geeks ... > > regards, tom lane > -- @Gmail --0016367b6bb47fc6af047c76d833 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Tom,

The timing is around 3.0 seconds
Time=3D3.0037=A0
Time=3D3.4038=A0
Time=3D3.0= 038=A0
Time=3D3.004 =A0
Time=3D3.2037=A0
Time=3D3.0039=A0
Time=3D3.0034=A0
Time= =3D3.0034=A0
Time=3D3.2039=A0
Time=3D3.0044=A0
Time=3D3.8044=A0
Time=3D3.2034=A0

I don't think that it could relat= e to DNS problem as I tried 2 methods which does not use name resolution ( = hosts file & ip address)=A0
I will=A0definitely seek the help from network geeks=A0and I will chec= k all TCP stack settings.=A0

Thank you!
=
Cheers,
Dmitri.


On Tue, Jan 5, 2010 at 4:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Dmitri Girski <mi= tek17@gmail.com> writes:
> I am running a PostgreSQL server 8.3.5 with a pretty much standard con= fig.

> The web application server which runs Apache 1.3/PHP2.9 =A0has an inte= rmittent
> problem:
> pg_connect takes exactly 3.0 seconds. The usual connection time is 0.0= 045.
> The long request happens at approximate rate 1:100.

Sounds a lot like a dropped-packets problem. =A0The exact timing woul= d be
explained if that is the retransmit timeout in your client-side TCP
stack. =A0If that's what it is, you need some network engineers, not us=
database geeks ...

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0regards, tom lane



--
@Gmail
--0016367b6bb47fc6af047c76d833--