Re: PHP + Postgres: More than 1000 postmasters produce - Mailing list pgsql-general

From scott.marlowe
Subject Re: PHP + Postgres: More than 1000 postmasters produce
Date
Msg-id Pine.LNX.4.33.0402201131180.11242-100000@css120.ihs.com
Whole thread Raw
In response to Re: PHP + Postgres: More than 1000 postmasters produce  ("Gellert, Andre" <AGellert@ElectronicPartner.de>)
List pgsql-general
On Fri, 20 Feb 2004, Gellert, Andre wrote:

> I have done this before, but when i remember right, the only effect is,
> that every second dozens of postmaster processes started and closed, because
> the connection is thrown away. This helps for now, as i can see on "low
> traffic" , but when I tried first, we had heavy load just by starting this
> large number of processes. There are 5-10 php skripts running per second, in
> peeks maybe even twice or more.
> This is a problem for the system , when for every process postmaster must be
> started, or am I wrong ?

Actually, most of my scripts spend a LOT more time running PHP and queries
than they do initiating connections.  If you get a chance, profile your
code (microtime() is useful for this) to see where the time is being
spent.  If you see the pg_connect time climbing non-linearly with load,
then you may need to use pg_pconnect.  If the time is climbing linearly
with load and is only a tiny fraction of the amount of time it takes to
run the script, then don't worry about it.


pgsql-general by date:

Previous
From: "Gellert, Andre"
Date:
Subject: Re: PHP + Postgres: More than 1000 postmasters produce
Next
From: "Gavin M. Roy"
Date:
Subject: Re: PHP + Postgres: More than 1000 postmasters produce