How to stop Django 3.0 leaking db connections?

Viewed 123

In my requirements.txt I only change from django==2.2.17 to django==3.0 (or 3.1.4)
and the gunicorn webserver starts leaking postgres db connections.
(Every request increases the number of connections when I check the list of clients in pgbouncer.)

I use python 3.7 and redis (via django-redis).

How can I stop the leakage?
Is there any way to limit the number of connections to a server?

Update
The leaks also happen with django==2.2.17 if I set 'CONN_MAX_AGE': None, even if I go directly to postgres, avoiding pgbouncer.

0 Answers
Related