Re: Many postmasters...

Поиск
Список
Период
Сортировка
От GH
Тема Re: Many postmasters...
Дата
Msg-id 20001205213821.A81189@over-yonder.net
обсуждение исходный текст
Ответ на Many postmasters...  (Jean-Christophe Boggio <cat@thefreecat.org>)
Список pgsql-general
On Wed, Dec 06, 2000 at 02:06:01AM +0100, some SMTP stream spewed forth:
> Hi everyone,

Hi

>
> Using Linux RH7.0 with correct gcc and glibc, PG7.03, Apache 1.3.14

> and PHP4. We have several unresolved questions :
Ah, but do not we all? ;-)

>
> * Is it normal that
Er, it seems so...not sure about the "defunct" business.

>   ps aux |grep postgres
>   shows (what we want : processes own by postgres) multiple postgres
>   backends (which seems normal to me) *AND* multiple postmaster (same
>   full cmd line).
>   Sometimes we also have "defunct" postgresses.
>
> * we start postgres with a /etc/rc.d/init.d script that launches
>   pg_ctl -w <many options here> start
>   When invoked from the shell, this command never returns to the shell
>   by itself, we have to press <enter>. This behaviour prevents the
>   script for terminating properly. Is there a way around this ?
>   Not tried echo | pg_ctl .... yet
I would need to see the code, but perhaps someone else would not. (?)

>
> * every backend created by an Apache session opens many files (in our
>   case, about 80 including the indexes) and many backends will finally
>   generate an "Too many files open" message. We first increased the
>   /proc/sys/fs/file-max to 8192 but that's a lot !
>
>   The apache/php server always uses the same connect parameters for
>   every page but it seems php's pg_pconnect() behaves just like
>   pg_connect. Shouldn't we have apache hold a few backends connected ?

pg_pconnect creates a persistent connection *for that Apache process*.
Id est: 10 backends, 10 persistent connections to 10 Postgres backends.
Yep, I hate the situation too, but tcl under AOLServer or Java are not
options to me, perhaps they are to you. (The overhead for non-persistent
connections is not *that* bad, but it is (to me) noticeable.)
Connection pooling would (somewhat) "fix" the situation, but...blah.
Unless you are in a situation where you can set MaxClients equal to
the max(backends) then I would just use regular connections (as I have
been "forced" to do in my current situation).

Apache does not (and can not?) do connection pooling in itself, I
believe there may be modules that do so, but I do not use them.

>
>
> Thanks for you attention and help.
Hey, that's why we are here, eh?

I hope that I have been (at least somewhat) helpful.

"'Aaaaaaarggggghhhhhh!' went Ford Prefect...", The Hitchhiker's Guide to
the Galaxy, Douglas Adams


gh

>
> --
> Jean-Christophe Boggio
> cat@thefreecat.org
> Independant Consultant and Developer
> Delphi, Linux, Oracle, Perl
>
>

В списке pgsql-general по дате отправления:

Предыдущее
От: Alain Toussaint
Дата:
Сообщение: Re: MacIntosh
Следующее
От: "Sam and Lisa Snow"
Дата:
Сообщение: RE: mailing list