Update Database class to force a reconnection after 5 minutes of inactivity.