Re: Ima::DBI and connections at Apache startup

[prev] [thread] [next] [Date index for 2004/10/06]

From: Perrin Harkins
Subject: Re: Ima::DBI and connections at Apache startup
Date: 15:23 on 06 Oct 2004
On Wed, 2004-10-06 at 07:01, Brad Bowman wrote:
> > I hate to introduce mod_perl-specific stuff into Ima::DBI, but it looks
> > like that may be the only way to keep the performance high.  My approach
> > would be check for $ENV{MOD_PERL} and if true create a different kind of
> > closure for getting the handle.  This closure would store the handle in
> > Apache->request()->pnotes() for the duration of the current request,
> > making it very fast to fetch and ensuring that it will get cleaned up
> > and Apache::DBI will get called again at the start of the next request. 
> > This ensures that the cleanup_handler for transactions will happen. 
> 
> Sounds good to me.

Tony, would you be willing to accept a patch like this for Ima::DBI?

> AutoCommit seems to be reset at DBI.pm line 640 in 'connect'
> after the cache is hit.  This would also effect Apache::DBI::connect.

Apache::DBI::connect doesn't actually call DBI if it has a connection.

> Will CDBI work out with AutoCommit = 0 for mysql with innodb?
> Is there anything to beware?

It works great with InnoDB.  The only thing to watch out for -- and this
is not a Class::DBI-specific issue -- is that the default isolation
level for InnoDB is not what most people who have used Oracle or
Postgres expect.  You will not see data committed by other processes
since your last commit or rollback.  You may want to change the
isolation level.

- Perrin

(message missing)

Ima::DBI and connections at Apache startup
Brad Bowman 08:03 on 04 Oct 2004

Re: Ima::DBI and connections at Apache startup
Perrin Harkins 17:15 on 04 Oct 2004

Re: Ima::DBI and connections at Apache startup
Brad Bowman 01:15 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Brad Bowman 04:47 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Perrin Harkins 14:27 on 05 Oct 2004

Problem with has_many and searching
John Day 16:06 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Perrin Harkins 14:26 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Brad Bowman 05:01 on 06 Oct 2004

Re: Ima::DBI and connections at Apache startup
Perrin Harkins 15:23 on 06 Oct 2004

Re: Problem with has_many and searching
Perrin Harkins 16:21 on 05 Oct 2004

Re: Problem with has_many and searching
John Day 17:26 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Tony Bowden 17:31 on 06 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52