1. I don't see the scenario you are talking about (dynamic connection 
pooling) actually working too well in practice because with most web sites 
there is usually peak times and non-peak times. Your database still has to 
handle the peak times and keep the connection open, so why not just leave 
the connection open during non-peak. It doesn't seem like it would really 
matter. Do you have a real scenario that this is a concern in?

2. I do see adding a regex on the connect string to explicitly stop 
Apache::DBI from caching the connection being valuable.

3. As a plug, I had also suggested a couple years ago that I would like the 
feature to be able to specifically not having the ping() method by 
Apache::DBI if the database had already been pinged within a set period of 
time.

I think the conclusion to #3 was that it would be good to add, but that I 
should add it. Unfortunately, I don't run a huge site on mod_perl so I 
didn't really care about eeking out performance this way (I think it was 
off the thread that the ping() method was very heavyweight on DBD::Sybase). 
Thus, I never added it and I don't know if anyone else ever was motivated 
to either.

Later,
   Gunther

At 07:53 PM 11/15/2000 -0600, Les Mikesell wrote:

>----- Original Message -----
>From: <[EMAIL PROTECTED]>
>To: "Les Mikesell" <[EMAIL PROTECTED]>
>Cc: "Tim Bunce" <[EMAIL PROTECTED]>; "Aaron" <[EMAIL PROTECTED]>;
><[EMAIL PROTECTED]>
>Sent: Wednesday, November 15, 2000 2:21 AM
>Subject: Re: database access
>
>
> > On Tue, 14 Nov 2000, Les Mikesell wrote:
> >
> > > I wonder if Apache::DBI could figure out what connections are worth
> > > holding open by itself?  It could have some hints in the config file
> > > like regexps to match plus a setting that would tell it not to
> > > make a connection persist unless it had seen  x instances of that
> > > connect string in y seconds.
> >
> > That really, really sucks, but Apache is selecting on the HTTP socket, and
> > nothing matters beyond that, except signals of course. What you are
> > implying is that DBI will be aware of the connections being closed or
> > SIGALRM coming thru to the apache and on its lap, but it won't happen.
>
>No, I realize there is nothing to do after the fact - what I meant was that
>Apache::DBI might allow disconnect to really happen the first few
>times it sees a connect string after a child startup.   If it saved the
>string with a timestamp and waited until it had seen the same string
>several times within a short interval it would be fairly likely that it
>would be worth staying connected.   You'd trade some slower hits
>off against not accumulating a huge number of little-used database
>connections.
>
>      Les Mikesell
>         [EMAIL PROTECTED]

__________________________________________________
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Web Technology Company
http://www.extropia.com/

Reply via email to