Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Apache2::DBI

by Thilosophy (Curate)
on Apr 19, 2005 at 05:11 UTC ( #449114=note: print w/ replies, xml ) Need Help??


in reply to Apache2::DBI

From the Apache::DBI docs:

Apache::DBI version 0.90_02 and later might work under mod_perl 2.0. See the Changes file for more information. Beware that it has only been tested very lightly.

And Changes says
0.93    January 10, 2004 
        - Change $r->connection->user to $r->user to make AuthDBI work
   	  with mod_perl 2.0 (thanks to Neil MacGregor and Brian McCauley )
	

0.90_02 January 10, 2003
        - Changes to make Apache::DBI load and function under mod_perl
          2.0.  A few important notes: connect_on_init does not work yet 
          and there's no automatic RollBack cleanup handler when
          autocommit is turned off.

So, it seems like Apache::DBI will (and probably already does) support mod_perl 2 as well.


Comment on Re: Apache2::DBI
Re^2: Apache2::DBI
by jbrugger (Parson) on Apr 19, 2005 at 05:20 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, 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...
    "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://449114]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-12-27 13:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls