If you have many database requests per second then it's very hard to restart script and database synchronously, especially when you have many instances of this script spread across cluster. | [reply] |
Still, it does not seem to make sense to let your script continue to run when the database is down.
| [reply] |
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.
| [reply] |