Re: Persistent DB connections and WSGI

20 views
Skip to first unread message

Jordi

unread,
Dec 22, 2015, 7:26:21 PM12/22/15
to django...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages