pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndquadrant.com>
To: Dmitri Girski <mitek17@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: pg_connect takes 3.0 seconds
Date: Mon, 04 Jan 2010 22:01:54 -0500
Message-ID: <4B42ABA2.4010103@2ndquadrant.com> (raw)
In-Reply-To: <daed64561001041812s602a3098l686f630d6448835f@mail.gmail.com>
References: <daed64561001041812s602a3098l686f630d6448835f@mail.gmail.com>

Dmitri Girski wrote:
> 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.

First thing to check for intermittent multi-second delays is whether a 
checkpoint is happening at that time.  See 
http://wiki.postgresql.org/wiki/Logging_Checkpoints for an intro, you'd 
want to see if the checkpoints are around the same time as the delays 
each time.  The default configuration makes checkpoints happen all the 
time if there's any significant write traffic on your database.

-- 
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com  www.2ndQuadrant.com

view thread (21+ messages)  latest in thread

Message-ID: <4B42ABA2.4010103@2ndquadrant.com>
Permalink:  ../4B42ABA2.4010103@2ndquadrant.com/
Also on:    postgresql.org/message-id/4B42ABA2.4010103@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: greg@2ndquadrant.com, mitek17@gmail.com
  Subject: Re: pg_connect takes 3.0 seconds
  In-Reply-To: <4B42ABA2.4010103@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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