| From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
|---|---|
| To: | "Gellert, Andre" <AGellert(at)ElectronicPartner(dot)de> |
| Cc: | "'Richard Huxton'" <dev(at)archonet(dot)com>, <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: PHP + Postgres: More than 1000 postmasters produce |
| Date: | 2004-02-20 18:32:45 |
| Message-ID: | Pine.LNX.4.33.0402201131180.11242-100000@css120.ihs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gavin M. Roy | 2004-02-20 18:54:29 | Re: PHP + Postgres: More than 1000 postmasters produce |
| Previous Message | Gellert, Andre | 2004-02-20 17:58:31 | Re: PHP + Postgres: More than 1000 postmasters produce |