forked from scVENUS/PeekabooAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: Retry on additional failure scenarios
There are a number of additional failure scenarios for database queries we regularly encounter. One is the server closing the connection, e.g. because it is restarting. The other is the server not being reachable (yet) because it is still restarting. This change adds handling for both via the connection_invalidated property of SQLAlchemy statement-related exceptions and adding a back-off retry for the MySQL-specific connection failed error code. This makes aggressive connection pool recycling unnecessary, so we can remove it. Closes scVENUS#171.
- Loading branch information
1 parent
1b8976c
commit 95bd13d
Showing
1 changed file
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters