#33497: Database persistent connections do not work with ASGI in 4.0
-------------------------------------+-------------------------------------
Reporter: Stenkar | Owner: Sarah
| Boyce
Type: New feature | Status: assigned
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ASGI, Database, | Triage Stage: Accepted
async |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by johnthagen):
As a user of Django, I was looking through the steps needed to optimize my
application, and came across
- https://docs.djangoproject.com/en/5.0/topics/performance/#other-
database-related-tips
It was then after a long amount of research/reading that I came across
this ticket. We are planning to soon upgrade our application to use
uvicorn workers and run under ASGI so that we can serve web sockets
alongside our HTTP API, and thus we now have pause to perform this
standard optimization due to this issue.
Questions:
1. Does this issue affect all ASGI Django HTTP endpoints, even synchronous
ones (e.g. no `async`, no `database_sync_to_async()`, etc.)?
2. Should the docs be updated to add a warning about the fact that
persistent connections are not currently fully compatible with ASGI? I'd
be happy to open a PR as it would have saved me personally a lot of time
if I had discovered this earlier in my research process.
--
Ticket URL: <https://code.djangoproject.com/ticket/33497#comment:31>
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/0107018dc16b680d-66c0c805-05ca-4030-b72e-c78eb4512869-000000%40eu-central-1.amazonses.com.