in reply to Re^2: Handle DBI connection lost
in thread Handle DBI connection lost

Still, it does not seem to make sense to let your script continue to run when the database is down.

Replies are listed 'Best First'.
Re^4: Handle DBI connection lost
by bash (Scribe) on Feb 23, 2017 at 01:40 UTC
    Generally I agree.

    But in my situation i have some tasks for script that can take > 10 min, so it's not possible to stop it immediately. But it's ok to wait for several seconds while database restarts.

    And of course there can be networking problem, so script should handle connection lost.