#33497: Database persistent connections do not work with ASGI in 4.0
-------------------------------------+-------------------------------------
Reporter: Stenkar | Owner: (none)
Type: New feature | Status: new
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ASGI, Database, | Triage Stage: Accepted
async |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by dseb):
Replying to [comment:38 johnthagen]:
> For Postgres users, will the new Django 5.1 postgres connection pools
mitigate this issue? Should ASGI users use this rather than persistent
connections?
>
> - https://docs.djangoproject.com/en/5.1/releases/5.1/#postgresql-
connection-pools
It seems that the answer is no, connection pools do not yet mitigate this
issue. In my testing, enabling connection pooling in an ASGI context
causes connection leaks. Even with a very high max connection count and a
small timeout value, I'm seeing occasional `OperationalError: couldn't get
a connection after X sec` errors.
--
Ticket URL: <https://code.djangoproject.com/ticket/33497#comment:42>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070192445d4b66-b095dc58-ab61-4766-83e2-81b8ad856384-000000%40eu-central-1.amazonses.com.