[Flask] invalid transaction -Flask-SQLAlchemy

Barak Bloch barak.bloch at gmail.com
Mon Jun 20 03:42:59 EDT 2016


Hey all,

I got again the famous error
sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid
transaction is rolled back

i tried to
1. change to session pool to be zero size (i don't really need it for my
app):
SQLALCHEMY_POOL_SIZE = 0

2. rollback each teardown_request

3. few different settings and tips from the internet

Nothing really helped me.
i don't need the pool of connection and really don't need anything but
working and stable connection to the DB.

the question is: what is the right approach to do when this error happend?


Thanks,
Barak.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160620/6baac8ee/attachment.html>


More information about the Flask mailing list