Re: PHP Connections

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Lynna Landstreet <lynna(at)gallery44(dot)org>
Cc: <pgsql-php(at)postgresql(dot)org>
Subject: Re: PHP Connections
Date: 2003-08-05 19:46:07
Message-ID: Pine.LNX.4.33.0308051345020.13847-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Tue, 5 Aug 2003, Lynna Landstreet wrote:

> on 8/5/03 3:07 PM, scott.marlowe at scott(dot)marlowe(at)ihs(dot)com wrote:
>
> > On Tue, 5 Aug 2003, Lynna Landstreet wrote:
> >
> >> But hey, come to think of it, maybe I could turn the pg_connect into a
> >> pg_pconnect and just have it check to see if $db already exists before
> >> connecting - that way there'd be only one connection per site visit! Cool,
> >> your question gave me a new idea... :-)
> >
> > Be VERY wary of persistant connections. They are fraught with danger and
> > can cause your server to present the "too many connections" error message
> > after being up for a while. <rest snipped>
>
> Hmmm, OK. I didn't realize they didn't time out. Maybe it's best to leave it
> the way it is now, with just one pg_connect being called in the head of each
> document. Thanks.

they can be set to, but it's by request, not over time. max requests per
child or some such setting. Setting it low enough helps prevent certain
problems. It's just that the default settings for apache/php/postgresql
are all designed to make your box go kaboom if you use persistant
connects. :-)

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Pawel Szczesny 2003-08-05 22:30:31 Re: undefined symbol: SortMem
Previous Message Lynna Landstreet 2003-08-05 19:45:33 Re: PHP Connections