diff --git a/lib/LDV.pm b/lib/LDV.pm index 406bb06..f037f2f 100644 --- a/lib/LDV.pm +++ b/lib/LDV.pm @@ -41,6 +41,11 @@ sub startup { $db->connect; return $db; }); + my $loop = Mojo::IOLoop->singleton; + $loop->recurring(60 => sub { + $self->app->db->ping; + $self->app->log->debug("db ping, process $$"); + }); my $r = $self->routes;