On Tuesday, January 16, 2018 at 6:26:34 PM UTC-5, Mike Bayer wrote:
dispose() is not needed inside of a web context. however, the kind > of web container you're using as well as if you are using something > like gevent or eventlet may be significant in why you are getting idle > transactions. > Mike- I thought `dispose()` was necessary with forking webservers if connections are made *before* the process forked, because the servers (typically) implement fork() behind the scenes. uwsgi offers a @postfork decorator (and an explicit hook) that I use to call the dispose(), and gunicorn has a `post_fork` hook. i don't recall the specifics of other servers. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.