On Fri, 22 Oct 2004, Tim Bunce wrote: > On Fri, Oct 22, 2004 at 09:00:23AM -0700, Tim Howell wrote:
> > 1. Better support for dead connections. In our setup we have > > applications running with Apache::DBI on linux that need to connect to a > > ProxyServer running on Win2K. Currently, if the ProxyServer dies for > > any reason, and then the application attempts to query it using an > > already established connection, the application dies. I think better > > behavior would be for an automatic reconnect to be attempted, and, if > > that fails, for the application to die. As I'm writing this, though, I > > wonder if it would be better to have the application itself eval a quick > > test of the dbh returned from DBI->connect and do the reconnect there if > > there are problems. I'm certainly open to feedback on this. > > By default it should simply cause the DBI method to fail via $h->set_err(...). > > Optionally it could support auto-retry *if* AutoCommit is off. But the > docs should warn about silent loss of any locks the app may have had. I agree that it shouldn't do anything magical, after all it's "just" a proxy. If you want to play with dead connections, I think that the user should just subclass DBI and do his own games in there (assuming set_err() is properly set so the user knows). I think that my DBIx::HA should properly work in conjunction with DBD::Proxy (if it doesn't I'll fix it so it does), and provides the user with all sorts of reconnect stuff. Henri