On Wed, 21 Jun 2000, Eric Jain wrote:

> > > Is it be possible to modify Apache::DBI in sich a way that only
> > > database connections specified in a PerlRequired startup.pl with
> > > Apache::DBI->connect_on_init(...) are stored and all subsequent
> > > DBI->connect(...) connections are properly established
> > (if no matching
> > > stored connection is available), but not stored afterwards?
> >
> > I'm not sure why you would want to do such a thing, but I
> > don't think it
> > fits with DBI/Apache::DBI's model...
> >
> > why exactly are you looking for this behavior?
> 
> Currently I don't use Apache::DBI, even though 99% of all connections
> are made as the same user, since I have a few users log in and connect
> with their own usernames. This would lead to every process having
> several open connections, using up lots of precious RAM...

If you just want a quick hack to make this work, you could put in a quick
check in the connect method of Apache::DBI which would skip caching
connections that use a username other than one you specify in your
startup.pl.  Should be easy to implement.

- Perrin

Reply via email to