On 18 mars 2013, at 17:10, Shai Berger <[email protected]> wrote:

> If the persistent connections are thread-local, don't you want to close them 
> anyway when the thread exits?

Yes, do you know how this could be achieved? I haven't found how to hook
on thread termination.

> ... but that fix will kill persistent connections under gunicorn.

If you're talking of gunicorn + gevent, persistent connections simply cannot
work, so this doesn't matter as long as Django doesn't use more database
connections than "live" threads.

> The solution that sounds "right" is to pool the persistent connections -- 
> every thread that ends returns the connection to the pool.

Yes, using an external pooler is the right solution in cases where persistent
connections don't work.

-- 
Aymeric.



-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to