Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 27DD863275C for ; Wed, 6 Jan 2010 22:44:41 -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 15504-06 for ; Thu, 7 Jan 2010 02:44:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f201.google.com (mail-pz0-f201.google.com [209.85.222.201]) by mail.postgresql.org (Postfix) with ESMTP id 1A1716333CA for ; Wed, 6 Jan 2010 22:44:29 -0400 (AST) Received: by pzk39 with SMTP id 39so105475pzk.15 for ; Wed, 06 Jan 2010 18:44:28 -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 :content-type; bh=nYYPBQq3lYfaUpMYyF2PcZJw7HPp+U1/0tEqmEZWIrs=; b=UIYs6hzZarmiqEXVGHZ+LZOAkR+wXWN8tF/TMgdd7fahAk+Y5hvmfVJj5zcRZAP/Km H8fCtj1R0+KXIYt7PHkAryFt85IZXwW0tM/mJii5R9WxMLJO78EDoCcluLj9xE5+YjdU ZcO+WzE6pjNUdYNxg0i0rwTpVaKESEtHcDJEQ= 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:content-type; b=pUQRMcyln0HhHqjZuWhYSizpGGkTK+uNIqMrVY3kCyMNAdoVlFugf1UcE8egfIb0NT Uab6R8JkPbxg2UW/ZjwlJOUuSkzqqXIyky7kQjslVjm8b+2NfGw6ayWnHhNZ3uslAB0D O5E5wVIKiuW0QtQvwBHk3f/KVxlGB004IcM8c= MIME-Version: 1.0 Received: by 10.114.23.9 with SMTP id 9mr17106368waw.132.1262832268201; Wed, 06 Jan 2010 18:44:28 -0800 (PST) In-Reply-To: References: From: Dmitri Girski Date: Thu, 7 Jan 2010 13:44:08 +1100 X-Google-Sender-Auth: 6b5e254a9dfbabd8 Message-ID: Subject: Re: pg_connect takes 3.0 seconds To: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=00504502e636c1cd80047c8a0c63 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.953 tagged_above=-10 required=5 tests=AWL=-0.496, BAYES_20=-0.74, FH_DATE_PAST_20XX=3.188, HTML_MESSAGE=0.001 X-Spam-Level: * X-Archive-Number: 201001/69 X-Sequence-Number: 36949 --00504502e636c1cd80047c8a0c63 Content-Type: text/plain; charset=ISO-8859-1 Hi everybody, Many thanks to everyone replied, I think we are on the right way. I've used tcpdump to generate the logs and there are a lot of dropped packets due to the bad checksum. Network guy is currently looking at the problem and most likely this is hardware issue. Cheers, Dmitri. On Tue, Jan 5, 2010 at 1:12 PM, Dmitri Girski wrote: > Hi everybody, > > 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. > > I turned on logs on postgres server side, and there is > nothing suspicious for me there. When a connection request comes, it is > being served without any delay. > > Could anyone point me to the direction in which I should investigate this > problem further? > Thank you in advance! > > > PS The hardware is: Dell SC1435/4Gb/2x2.0GHz/Gentoo Linux. > The database & web servers are in the 2 local subnets. > > > Dmitri. > > -- @Gmail --00504502e636c1cd80047c8a0c63 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi everybody,

Many= thanks to everyone replied, I think we are on the right way.=A0
I've used tcpdump to generate the logs and ther= e are a lot of dropped packets due to the bad checksum. Network guy is=A0cu= rrently=A0looking at the problem and most likely this is hardware issue.

Cheers,
Dmitri.

On Tue, Jan 5, 2010 at 1:= 12 PM, Dmitri Girski <mitek17@gmail.com> wrote:
Hi everybody,

I am running a Postg= reSQL server 8.3.5 with a pretty much standard config.

The web application server which runs Apache 1.3/PHP2.9 = =A0has an intermittent problem:
pg_connect takes exactly 3.0 seco= nds. The usual connection time is 0.0045.
The long request happens at approximate rate 1:100.

= I turned on logs on postgres server side, and there is nothing=A0suspicious= =A0for me there. When a connection request comes, it is being served withou= t any delay.=A0

= Could anyone point me to the direction in which I should investigate this p= roblem further?
Thank you in advan= ce!

=
PS The hardware is: Dell=A0SC= 1435/4Gb/2x2.0GHz/Gentoo Linux.
Th= e database & web servers are in the 2 local subnets.=A0

=
Dmitri.




--
@Gmail
--00504502e636c1cd80047c8a0c63--