Re: How do you use mod_perl for your web application?

"Octavian Rasnita" <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <F2BD5EBC20F9467A80355E718E119D66@teddy>
Here is a comment that might be helpful, because it also explains why DBIx::Class can work with Apache::DBI (and why it is not needed):

http://lists.scsys.co.uk/pipermail/dbix-class/2006-April/001153.html

""
DBIx::Class already manages its connections for you, and therefore it
cannot benefit from Apache::DBI under any scenario.  It makes one
connection per-process, and keeps that connection persistent,
reconnecting only if the connection appears to have died, or if you
fork/thread over to another process/thread-id.  The only Apache::DBI
issue in DBIx::Class is that Apache::DBI will actually thwart
DBIx::Class's connection management code, and cause it to use the same
(and invalid) connection in a new process, in cases such as (as
mentioned above) if you make a DBI connection before forking in a
prefork mod_perl server.
 
To work around this, DBIx::Class has specific code in it to work
around Apache::DBI, nullifying the effects of Apache::DBI on
DBIx::Class.  Essentially, loading Apache::DBI should change nothing
and be rather pointless under DBIx::Class.

The only reason we support it (support working around it) is because
someone might want Apache::DBI loaded up under the same mod_perl as a
DBIx::Class application to support a different legacy application
which does not use DBIx::Class, in which case they share a perl
interpreter and will both have the same set of modules loaded.
""

Octavian

----- Original Message ----- 
From: "Fred Moyer" <[email protected]>
To: "Octavian Rasnita" <[email protected]>
Cc: <[email protected]>; "mod_perl list" <[email protected]>
Sent: Monday, June 27, 2011 6:37 PM
Subject: Re: How do you use mod_perl for your web application?


> On Sun, Jun 26, 2011 at 10:55 PM, Octavian Rasnita <[email protected]> wrote:
>> From: "Randolf Richardson" <[email protected]>
>>> I believe Catalyst depends on DBIx::Class, which also tries to turn
>>> off the connection caching features provided by Apache::DBI (if I'm
>>> recalling correctly) -- if this is true, then it could certainly help
>>> to explain the lesser performance in a ModPerl environment.
>>
>>
>> Catalyst doesn't depend on DBIx::Class.
>> DBIx::Class just does its own persistent connection and this is why it
>> doesn't need Apache::DBI.
> 
> Do you have any evidence for this claim?  I've been using DBIx::Class
> with Apache::DBI for several years and have never seen anything to
> this effect.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.