in reply to Re: Apache2::DBI
in thread Apache2::DBI

I looked at it as well, and came to the same conclusion, but now i'm begining to wonder if this is stable enough to use on reallife servers, or should we advice to stick to apache1 if there is a need for apache::dbi?.
For freebsd seems to be a patch or something...
>Description: The p5-Apache-DBI port only uses mod_perl (not mod_perl2). The website seems to suggest it will work with mod_perl2, just it's not been that extensively tested. I'm requesting this change because www/rt3 uses this port, and I'm running it on apache2 with mod_perl2. >How-To-Repeat: >Fix: This patch adds an option to build with mod-perl2. This doesn't change the current behaviour if there are no extra defines, so seems fairly safe to apply. --- p5-Apache-DBI-mp2.diff begins here --- diff -ruN p5-Apache-DBI.bak/Makefile p5-Apache-DBI/Makefile --- p5-Apache-DBI.bak/Makefile Mon Jun 9 22:43:46 2003 +++ p5-Apache-DBI/Makefile Tue Jun 10 20:39:27 2003 @@ -15,8 +15,14 @@ MAINTAINER= skv at FreeBSD.org COMMENT= DBI persistent connection, authentication and authorizati +on -RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/www +/mod_perl \ - ${SITE_PERL}/${PERL_ARCH}/Bundle/DBI.pm:${PORTSDIR}/databases +/p5-DBI +RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Bundle/DBI.pm:${PORTSDIR}/d +atabases/p5-DBI + +.if defined(WITH_MODPERL2) +RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/mod_perl2.pm:${PORTSDIR}/w +ww/mod_perl2 +.else +RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/ww +w/mod_perl +.endif + BUILD_DEPENDS= ${RUN_DEPENDS} PERL_CONFIGURE= yes --- p5-Apache-DBI-mp2.diff ends here ---

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Replies are listed 'Best First'.
Re^3: Apache2::DBI
by Thilosophy (Curate) on Apr 19, 2005 at 05:46 UTC
    I looked at it as well, and came to the same conclusion, but now i'm begining to wonder if this is stable enough to use on reallife servers

    I have heard many people wondering the same thing about mod_perl 2 itself...

    Are those people just overly cautious or are there still any real issues with mod_perl 2?

      Indeed, but mod_perl2 reached RC5 a few days ago and seems (to us) stable enough to even use in production environments.
      For de DBI module however, we had problems with it, the internal ping process did not work, so we contstantly had a 'runaway' MySQL database. We fixed it by implementing the ping below, and it seems stable now:
      sub ping { my $ret = 0; if (time - $DBI::lastPing < 10) { #check once in 10 seconds return 1; } eval { local $SIG{__DIE__} = sub { return (0); }; local $SIG{__WARN__} = sub { return (0); }; # adapt the select statement to your database: $ret = $DBH::conn->do('select 1'); $DBI::lastPing = time; #record time in seconds }; $debug && print STDERR "DBH.pm: pinging DB handle: $ret\n"; return ($@) ? 0 : $ret; }
      "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.