小编Mat*_*aas的帖子

SQLAlchemy连接错误

我遇到了一些奇怪的错误,这些错误似乎是由Sqlalchemy使用的连接造成的,我无法准确确定..我希望有人有一个线索在这里发生什么.

我们正在开发Pyramid(版本1.5b1)并使用Sqlalchemy(版本0.9.6)进行所有数据库连接.有时我们会得到与数据库连接或会话相关的错误,大部分时间都是错误cursor already closedThis Connection is closed错误,但我们也得到其他相关的异常:

(OperationalError) connection pointer is NULL
(InterfaceError) cursor already closed
Parent instance <...> is not bound to a Session, and no contextual session is established; lazy load operation of attribute '...' cannot proceed

A conflicting state is already present in the identity map for key (<class '...'>, (1001L,))
This Connection is closed (original cause: ResourceClosedError: This Connection is closed)
(InterfaceError) cursor already closed
Parent instance <...> is not bound to …
Run Code Online (Sandbox Code Playgroud)

python multithreading sqlalchemy

5
推荐指数
1
解决办法
2095
查看次数

标签 统计

multithreading ×1

python ×1

sqlalchemy ×1