cockroachdb / cockroachdb/sqlalchemy-cockroachdb

sqlalchemy.exc.ResourceClosedError: This Connection is closed

Aperta
#97 9 commenti 0 reazioni 1 assegnatario Rivendicata da @rafiss Vedi su GitHub
bug
Lingua principale
Python
Stelle
156
Fork
65
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

We are using from cockroachdb.sqlalchemy import run_transaction in a multi-threaded python application.

Occasionally we are receiving the following error that sqlalchemy.exc.ResourceClosedError: This Connection is closed

Based on my research I'm not sure if this is related to the application being multi-threaded or the need for connection disconnect error handling.

Would someone be able to confirm that run_transaction is, in fact, thread-safe?

If it is thread-safe is there a suggested strategy for implementing connection disconnect?
https://docs.sqlalchemy.org/en/13/core/pooling.html#pool-disconnects

Also, would this solution be something that should be added into run_transaction?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.