On Monday, April 2, 2018 at 1:40:06 PM UTC-4, Mike Bayer wrote:
>
> now we can probably do better than that but the dispose() case is not 
> supposed to be that common or critical, it's usually for when you just 
> did a fork(), and you don't want to reference any of the filehandles 
> in the parent process (but to that extent, dispose() is not ideal 
> because it will step on those connections that might be *used* by the 
> parent....so...more bugs :) ) 
>

One person's uncommon is another person's everyday ;)

Someone was running a pyramid app with SqlAlchemy connection issues.  They 
were running in a gunicorn container, and connected to the database 
pre-fork to pull out some configuration settings - at the very least they 
needed to call `Engine.dispose()`.  There may be some other things going on 
too, but that's the guaranteed way to screw up database connections running 
in gunicorn, uwsgi and a few 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.

Reply via email to