Re: CPU bound at 99%

From: Bryan Buecking <buecking(at)gmail(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: CPU bound at 99%
Date: 2008-04-22 15:56:46
Message-ID: 20080422155640.GD5961@starling-software.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Apr 22, 2008 at 08:41:09AM -0700, Joshua D. Drake wrote:
> On Wed, 23 Apr 2008 00:31:01 +0900
> Bryan Buecking <buecking(at)gmail(dot)com> wrote:
>
> > at any given time there is about 5-6 postgres in startup
> > (ps auxwww | grep postgres | grep startup | wc -l)
> >
> > about 2300 connections in idle
> > (ps auxwww | grep postgres | idle)
> >
> > and loads of "FATAL: sorry, too many clients already" being logged.
> >
> > The server that connects to the db is an apache server using
> > persistent connections. MaxClients is 2048 thus the high number of
> > connections needed. Application was written in PHP using the Pear DB
> > class.
>
> Sounds like your pooler isn't reusing connections properly.

The persistent connections are working properly. The idle connections
are expected given that the Apache child process are not closing them
(A la non-persistent). The connections do go away after 1000 requests
(MaxChildRequest).

I decided to move towards persistent connections since prior to
persistent connections the idle vs startup were reversed.

--
Bryan Buecking http://www.starling-software.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bryan Buecking 2008-04-22 16:10:26 Re: CPU bound at 99%
Previous Message Erik Jones 2008-04-22 15:55:19 Re: CPU bound at 99%