cockroachdb / cockroachdb/sqlalchemy-cockroachdb

sqlalchemy.exc.ResourceClosedError: This Connection is closed

未關閉
#97 9 則留言 0 個 reaction 已指派 1 人 已被 @rafiss 認領 在 GitHub 檢視
bug
主要語言
Python
星號
156
分支
65
PR 合併指標
30 天內沒有已合併 PR

描述

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?

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。