Re: Apache pre-forking
[prev]
[thread]
[next]
[Date index for 2004/08/02]
On Mon, Aug 02, 2004 at 01:47:08PM -0400, Perrin Harkins wrote:
> On Mon, 2004-08-02 at 11:35, Tony Bowden wrote:
> > So, IIUC
> > - It's a good idea to pre-load modules in your Apache startup
> > - It's a bad idea to have database connections as part of these
> >
> > So how do people marry these two concepts if they're being sufficiently
> > lazy to use a driver specific Class::DBI subclass that sets up the
> > column info etc at compile time by accessing the database?
>
> If you use a recent DBI, connect_cached will use Apache::DBI to do the
> work. Apache::DBI doesn't cache connections during startup. The result
> is that your connection will be closed after setting up the table and
> then reopened after the fork.
It doesn't cache connections, but does it (or something else) explicitly
disconnect before the fork?
Tim.
> Provided your DBD is well-behaved, it
> should work fine. You can turn on Apache::DBI debugging if you want to
> make sure the connections are being handled correctly.
>
> - Perrin
>