[CDBI] reconnecting after timeout

Jay Strauss me at heyjay.com
Tue Feb 21 16:10:00 GMT 2006


> Ima::DBI calls $dbh->ping and checks $dbh->{Active} before it uses the
> $dbh.
>
> If the connection is dead one of those should return false.
>
> It's always worked beautifully for me on every database I tried it on; what
> DBIx::Class does is extremely similar and I haven't had any problems with
> that either - including our Oracle-based users, a number of whom came from
> CDBI and didn't have this problem there either.
>
> So I'm definitely voting for "not Class::DBI's fault".

You're totally correct.  I just ran a script that manually disconnects, and 
watched the DB for the disconnect, and then it selected using CDBI and I got 
a new connection.

Maybe I'll stick a manual disconnect into the code and see if that works.  I 
don't know why it's not working on my end when the connection is idle (and 
the db kills it).

Jay




More information about the ClassDBI mailing list