what could cause the FlaskSQLAlchemy session to change?

时光总嘲笑我的痴心妄想 提交于 2021-01-29 05:43:08

问题


We are using the Flask development server which I know we need to change. It seems that when two requests come in very close to each other bad things happen. On one of those occasions we got this error upon commit:

sqlalchemy.exc.InvalidRequestError: Object '<SomeClass at 0x7fca30277b38>' is already attached to session '41' (this is '42')

I know that there should be one FlaskSQLAlchemy session per request. Would this error imply that processing of the second request changed the session? What would be the best way to verify this hypothesis?

来源:https://stackoverflow.com/questions/61762310/what-could-cause-the-flasksqlalchemy-session-to-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!