Re: [sqlalchemy] uwsgi + sqlalchemy - forking concern

2014-06-16 Thread Jonathan Vanasco
Thanks Michael Jeff. I'm reading this as the issue is in the underlying dbconnection that sqlalchemy has , not creating a sqlalchemy engine. If that is the case, then I don't have anything to worry about now -- but will add in an `engine.dispose()` hook after the fork just to be safe. --

[sqlalchemy] uwsgi + sqlalchemy - forking concern

2014-06-15 Thread Jonathan Vanasco
i'm using sqlalchemy in pyramid, under uwsgi. i've been reading up on forking issues that can arise in this stack. from what I understand, issues arise because the SqlAlchemy Connection is established before the fork, resulting in each forked process potentially trying to use the same

Re: [sqlalchemy] uwsgi + sqlalchemy - forking concern

2014-06-15 Thread Mike Bayer
yeah what he said, but also, in a forking situation the easiest thing you can do is, as soon as the fork starts, say engine.dispose(). Or just engine = some new engine. all you need to do is make sure no DB connections in the pool (or anywhere else) are allowed to continue in the fork. On