Tuesday, December 22, 2015

Re: Persistent DB connections and WSGI

Hi,

Can I take for granted that connections between the DB and Django get
closed when threads get killed?
I take my max_connections in postgres to be the amount of WSGI threads +
some safety margin, and put use Django
in persistent DB connection mode (CONN_MAX_AGE = None) to avoid the
overhead of re-establishing connections, but then if for some
reason threads get killed abrubtly by WSGI and restarted, I may run out
of max_connections if they didn't get closed properly?
Or is this not a concern?

Thanks
Jordi

--
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/5679D6CB.50200%40promani.be.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment