Lev Lvovsky wrote:
Once you reconnect, the connection is persistent again. At least, that's been my experience with postgresql.

This is exactly what I've been thinking to do, but I've not seen anything within Apache::DBI that allows me to reconnect per se. How do I perform that action?

Also, forgive this question if it seems a little obtuse, but in the startup.pl file, I do something like this:

Apache::DBI->connect_on_init(...)


My experience with Apache::DBI has been that it needs no special setup.

All I've ever done is:

my $dbh;
$cnt = 0;
while(!$dbh) {
  eval {
    $dbh = DBI->connect(....);
  };
  if($@) {
    warn("DB Down: $@");
    sleep 5;
    $cnt++;
  }
  last if $cnt > 3;
}

unless($dbh) {
  # show user an error page
}

Rob

Reply via email to