From: | Alfred Perlstein <bright(at)wintelcom(dot)net> |
---|---|
To: | Jean-Christophe Boggio <cat(at)thefreecat(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Many postmasters... |
Date: | 2000-12-07 09:33:16 |
Message-ID: | 20001207013316.N16205@fw.wintelcom.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
* Jean-Christophe Boggio <cat(at)thefreecat(dot)org> [001207 01:11] wrote:
> Hi everyone,
>
> Using Linux RH7.0 with correct gcc and glibc, PG7.03, Apache 1.3.14
> and PHP4. We have several unresolved questions :
>
> * Is it normal that
> 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.
I've not seen this.
> * 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
put an & at the end of the command to run it in the background.
or you can reveal what "<many options here>" so we can offer
some real advice.
>
> * 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 !
No it's not.
> 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 ?
Er, I think that's what it's doing, otherwise you wouldn't have this
mess, postgresql startup is pretty cheap, you might want to not
use the pconnect and see what happens.
We removed pconnect from a apache server connecting to a mysql
server and it saved quite a bit of CPU because we only needed
the php connections for a few pages.
--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Haberlach | 2000-12-07 09:59:58 | Modification times in records? |
Previous Message | Jean-Christophe Boggio | 2000-12-07 08:46:40 | Many postmasters... |