-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
A db connection will hang when there is a network change. This is because we don't enforce timeout at any level. For detailed explanation, please refer to this article.
There are several ways to fix it:
- Specify socket timeout. This is easy to implement (modify connection string), but it is hard to find the optimal value, or to use special setting for legitimate long-running query.
- Enforce timeout on transactor. This requires a refactoring of the transactor implementation (relevant PR: Allow clients to request the transactor to retry queries #210).
- Call
isValidbefore checking out a connection from the pool (modify this method). This approach will only partially solve this problem. Queries that are already running while there is a network change will still suffer from this issue. In addition, currentlyIDbmethods are implemented in each implementation, while many of the methods are the same and can be extracted to a base class. Should we choose this approach, we should consider performing this refactoring as well.
Metadata
Metadata
Assignees
Labels
No labels