Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try connection pre-ping #220

Closed
rod-glover opened this issue Jan 26, 2023 · 0 comments · Fixed by #223
Closed

Try connection pre-ping #220

rod-glover opened this issue Jan 26, 2023 · 0 comments · Fixed by #223

Comments

@rod-glover
Copy link
Contributor

rod-glover commented Jan 26, 2023

We are having trouble with connections being dropped by our proxy (or some other culprit), leading to an error in the backend. SQLAlchemy connection pre-ping is one possible "external" answer to that problem. However, note the following from that document:

It is critical to note that the pre-ping approach does not accommodate for connections dropped in the middle of transactions or other SQL operations. If the database becomes unavailable while a transaction is in progress, the transaction will be lost and the database error will be raised. While the Connection object will detect a “disconnect” situation and recycle the connection as well as invalidate the rest of the connection pool when this condition occurs, the individual operation where the exception was raised will be lost, and it’s up to the application to either abandon the operation, or retry the whole transaction again.

There is an alternative; see #221 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant