Wednesday, January 18, 2017

Re: What is the fate of closed database connections?

On Tue, Jan 17, 2017 at 7:58 PM, Fred Stluka <fred@bristle.com> wrote:
> Mike,
>
> As of version 1.6, Django supports persistent DB connections
> (connection pooling).

Pedantry: Persistent connections are not the same as connection
pooling. With persistent connections, if a worker does not have a
currently open connection to the database, it will open a new one.
With a connection pool, it will retrieve an unused open connection
from the pool, which is shared amongst many processes.

Connection pools are not built in to django, but you can use external
software like pgbouncer to provide them.

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1%2B-1W%2BvphSCFotb0gnjYmSzvFmorn4TsTSuBBNWMn9MrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment