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 摘要。