You could set MaxRequestsPerChild in apache's httpd.conf. This controls
how many requests each apache process is allowed to serve. After it
serves this many the process dies which should close the postgres process
as well (if it isn't, you have other problems).
I know that for a long time Apache recommened setting this fairly low on
Solaris due to a memory leak in solaris...ideally you'd want to set this
really high, but setting it low will make the processes die...
-philip
On Fri, 24 Nov 2000, jmcazurin wrote:
>
> At 12:47 PM 11/24/00, GH wrote:
> >On Fri, Nov 24, 2000 at 03:17:59PM +1100, some SMTP stream spewed forth:
> > > Oh, and if you are using pg_close() I don't think it works
> > > in any currently released PHP4 versions. See:
> >
> >This seems to be true. I ran into some fun link errors while
> >connecting and disconnecting more than once in a script.
>
> This sounds disturbing!
>
> How then should I go about closing persistent connections? Can I close
> them at all?
>
> Would pg_close() work if I used it on non-persistent connections?
>
> Thanks in advance,
>
> Mikah
>