You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A teardown handler can be used to roll back the transaction and release the connection. It still will not reattempt the transaction, and the web request will still fail, but that is better than leaving the connection blocked.
This has to do with session management. Normally in this situation people use Flask-SQLAlchemy to automatically set the scoped_session sesssion scope to per-request; I was doing it globally.
If you're not using Flask-SQLAlchemy to do this you have to do it yourself
A teardown handler can be used to roll back the transaction and release the connection. It still will not reattempt the transaction, and the web request will still fail, but that is better than leaving the connection blocked.
http://stackoverflow.com/questions/33284334/how-to-make-flask-sqlalchemy-automatically-rollback-the-session-if-an-exception
http://stackoverflow.com/questions/21078696/why-is-my-scoped-session-raising-an-attributeerror-session-object-has-no-attr
The text was updated successfully, but these errors were encountered: