Re: PHP + Postgres: More than 1000 postmasters produce

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: PHP + Postgres: More than 1000 postmasters produce
Дата
Msg-id Pine.LNX.4.33.0402201131180.11242-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: PHP + Postgres: More than 1000 postmasters produce  ("Gellert, Andre" <AGellert@ElectronicPartner.de>)
Список 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 по дате отправления:

Предыдущее
От: "Gellert, Andre"
Дата:
Сообщение: Re: PHP + Postgres: More than 1000 postmasters produce
Следующее
От: "Gavin M. Roy"
Дата:
Сообщение: Re: PHP + Postgres: More than 1000 postmasters produce