On Tuesday, January 16, 2018 at 12:33:42 PM UTC-5, Joe Biggert wrote:
>
> we've got a wrapper around our requests that basically looks like this:
>

On Tuesday, January 16, 2018 at 2:34:25 PM UTC-5, Mike Bayer wrote:
>
> the dispose at the end is completely wrong, sorry. 
>
... 

> or if you are starting up a new process using either os.fork() or 
> multiprocessing. 
>

Since this appears to be in a web context, I believe `.dispose()` is also 
required if you're using a forked application server (e.g. uwsgi, mod_wsgi 
in many contexts, etc).

if that is the case and your code is connecting to the database at all 
before the fork, you should be able to define an "at fork" routine that 
calls `dispose()` for whatever deployment framework you're using. 

 

-- 
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