benvanstaveren / Mojolicious-Plugin-Database

"proper" handling of DBI based connections in Mojolicious
http://search.cpan.org/dist/Mojolicious-Plugin-Database/
9 stars 3 forks source link

Reconnect to database in case of lost connection #11

Open pierre-vigier opened 7 years ago

pierre-vigier commented 7 years ago

If $dbh->ping does not work, replace the attribute once again with a new connection.

Might not be perfect, but cover all the cases i encountered

pierre-vigier commented 7 years ago

I forgot to add a treshold to do the check only every x seconds, i'll add that soon

stuartskelton commented 3 years ago

@benvanstaveren are you able to look into getting this merged please?