Re: Website troubles

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
Cc: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, <greg(at)turnstep(dot)com>, Tony Grant <tony(at)tgds(dot)net>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Website troubles
Date: 2003-01-30 21:12:06
Message-ID: Pine.LNX.4.33.0301301409250.22730-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 30 Jan 2003, Lincoln Yeoh wrote:

> At 10:52 PM 1/29/03 -0400, Marc G. Fournier wrote:
>
> >The problem is/was persistent database connections ... the problem, IMHO,
> >is that there is no way of 'timing out' idle connections, so any load on
> >the web site that creates a whack of persistent connections, and then they
> >all go idle, then if another hit on a different database goes through, it
> >gets starved for connections ...
>
> Why does it get starved for connections if there are idle ones? Why can't
> the idle ones connect to a different DB?

It happens because php runs as a module under apache and each persistant
connection is associated with an apache child / php pair.

To prevent this problem, the sum of all maximum apache children for all
web servers hitting a given database HAS to be lower than the max
connections setting for postgresql or you will eventually, under load and
at the worst possible time, experience connection starvation and have dead
pages loading. It's an easy configuration change to make. But it wasn't
made on the postgresql.org boxen apparently before now.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bodanapu, Sravan 2003-01-30 21:35:26 Error connecting to Postgres database.
Previous Message Marc G. Fournier 2003-01-30 20:10:25 Re: pgsql.com problem.